Hello there, in order to keep family time for my e...
# general
n
Hello there, in order to keep family time for my employee we want to inforce a no connexion policy to NetSuite outside of working time. Would you have any idea on how to restrict access according to working calendar for example? Thanks a lot!
a
Seems like this will have to be scripted. More specifically, from some old overflow posts, seems like we can’t simply check and uncheck the give access checkbox programmatically but instead will have to remove each associated role and and then give it back when we want to allow them to log back in.
n
Wow I thought about the scheduled script with giving and removing access, but you are right, the role is enough. Thanks a lot.
m
If you remove a role and add it back, does that retain all their settings (dashboard, shortcuts etc..)? NetSuite has a feature that you can set a suitelet landing page on login. Perhaps you can use that to display an error message / somehow log out if the current time doesnt fall in their working hours.
👍 1
a
I would assume the settings would be lost and I had no idea about that suitelet. Seems like a real fun exercise to always redirect to that suitelet with an error message when they login outside of working hours 😆. But can you actually do it? I feel like a user could just open another tab and the suitelet would no longer appear since you’ve technically already logged in on the previous tab, no?
m
I haven't tried this before. Also they might be able to log in via a direct link to a specific page and bypass the suitelet.
Depends on how strongly you want to enforce this. It could be efficient as a gentle reminder to employees that it's family time, but not really as a security measure
👍 1
Another option could be to set the employee as inactive but that may have other ramifications of the employee record needs to be used for other things
a
Maybe you could warm up to removing access via script by first having an email notification send to the user and their manager every time they log in after hours? Then after a few warnings messages that they’re acting out of policy they would be added to the scheduled script and receive the ultimate “punishment” of having their access removed and settings lost?
😄 1
n
Thanks a lot @michoel and @AFL 😉
m
Removing roles does remove personal settings and custom dashboards. I think @michoel mentioned that. But I'm pretty sure it is true. Not a good way to limit access. What about IP restrictions? Make it so you can only use NetSuite from the office.
a
But why remove a role which is a completely different behavior than the one you are going to implement? Just Create: A suitelet for build the "gentle reminder" HTML page. Than create a user event deployed over ALL RECORDS which: • read the employee id • If present • Load the workcalendar • compare time of the day • Redirect to the "gentle reminder page" in case is trying to work outside the calendar time. The challenge here is that the server time it's always the same regardless the office location and to compare it to the calendar which will be returned in the logged user locale. But if you are in a single time zone it will be really easy to implement this.
d
Locking someone out seems a bit overkill to me, as it prevents that staff member being useful in the event of something unusual happening. Can you not just set up a login audit search triggered by outside hours access and deal with it as an HR issue in the first instance? If not, I'd probably set a dashboard view and a portlet which just shows a big alert if the user logs in out of hours.
n
@MySuite, @Andrea Rivetti, @Dominic B thanks all for your wonderful inputs!