How to limit working hours for any access level?

Questions related to using nuBuilder Forte.

How to limit working hours for any access level?

Unread postby miasoft » Tue Sep 21, 2021 11:19 pm

Users are ready to work around the clock. I would like to have my own time to modify the server and database. I would like to limit their work, for example, from 08:00-20:00 . How is it easier to do this?
Wbr, miasoft.
miasoft
 
Posts: 100
Joined: Wed Dec 23, 2020 8:58 pm
nuBuilder Version: 4.5

Re: How to limit working hours for any access level?

Unread postby kev1n » Tue Sep 21, 2021 11:35 pm

Hi,

Add a new Procedure with a global nuBeforeEdit event:

Code: Select all
if (nuGlobalAccess()) return;

$d = date('H');

if ($d < 8 || $d > 20) {
    nuDie('The system is down for maintenance from 20:00 - 08:00');
}
Attachments
be_event.jpg
be_event.jpg (44.84 KiB) Viewed 156 times
kev1n
nuBuilder Team
 
Posts: 2053
Joined: Mon Oct 15, 2018 2:13 am
nuBuilder Version: 4.5

Re: How to limit working hours for any access level?

Unread postby miasoft » Wed Sep 22, 2021 12:21 am

Thanks! That's great! :)
Wbr, miasoft.
miasoft
 
Posts: 100
Joined: Wed Dec 23, 2020 8:58 pm
nuBuilder Version: 4.5


Return to General

Who is online

Users browsing this forum: No registered users and 18 guests