-permissions now checks if a user can access a specific ticket page, or a viewtickets page for a specific department. if not, the user is redirected to the restricted page