hello, I’m building a saas project but I need users to not have access to the system on the weekend “Saturday and Sunday” how can I make this restriction?
hi @contato53, and welcome to the community!
you can do that by checking the current date on login and on homescreen.
allow login only if the date doesn’t fall on a Saturday or Sunday, show an alert when a user tries to login on the weekend to avoid user frustration.
On homepage (if users were already logged in)
log the user out on pageload if the date falls on a Saturday or Sunday.
I still feel this way may not be the best, though so if anyone has a better way please share!
It worked perfectly, thank you very much for your help.
This topic was automatically closed after 70 days. New replies are no longer allowed.