- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 01:52 AM
How do you set a custom 403 page for an experience?
Today, if a user is not allowed to access the page, we got a blank page with this red message: "403: You do not have permissions to access this page."
Solved! Go to Solution.
- Labels:
-
Now Experience UI Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 04:33 AM
After some investigation, we choose to create a new simple page as an entry point for all users whoever they are (originally named "entry").
- When people connect to our app they will be redirected to the "entry" page.
- When this page load, on the "page ready" event, we check if the current user is allowed to continue (we use a custom backend transform method to do the check)
- if they are not allowed to access the app, we show a message asking them to request some credentials via a given ServiceNow Request (we give them a link).
- If they are allowed to continue, we redirect them to the our welcome page.
- In order to avoid people missing around trying to access our app by forcing another URL ressource to load, on the backend, we created 2 ACLs:
- one ux_page ACL which will check on all pages of the app (all but the "entry" page) if the current user is allowed (has credentials) to see something or not;
- another one ux_page ACL which grant access to all snc_internal users to the "entry" page. It means that if a user bypass the entry page, they will see the oldy but goody system 403 page if he is not allowed to be there.
Feel free to give inputs if you see some flaws/issues/mistakes/improvment to do here.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 08:26 AM
You can try mapping the Event - Page Error and see if it redirects you but thinking this is system functionality that we can't override.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 04:36 AM
Thanks for your input Michael. Unfortunately the solution you proposed was not working (or i may have missunderstand what you were trying to imply).
But we found another solution, check out my other comment!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2022 04:33 AM
After some investigation, we choose to create a new simple page as an entry point for all users whoever they are (originally named "entry").
- When people connect to our app they will be redirected to the "entry" page.
- When this page load, on the "page ready" event, we check if the current user is allowed to continue (we use a custom backend transform method to do the check)
- if they are not allowed to access the app, we show a message asking them to request some credentials via a given ServiceNow Request (we give them a link).
- If they are allowed to continue, we redirect them to the our welcome page.
- In order to avoid people missing around trying to access our app by forcing another URL ressource to load, on the backend, we created 2 ACLs:
- one ux_page ACL which will check on all pages of the app (all but the "entry" page) if the current user is allowed (has credentials) to see something or not;
- another one ux_page ACL which grant access to all snc_internal users to the "entry" page. It means that if a user bypass the entry page, they will see the oldy but goody system 403 page if he is not allowed to be there.
Feel free to give inputs if you see some flaws/issues/mistakes/improvment to do here.