Skip to content
MyAppBuilder
StableGuide

Protected pages

A protected page can only be opened by signed-in users, optionally limited to certain roles. Visitors who are not signed in are sent to the sign-in screen and brought back afterwards; signed-in users of the wrong role see Access denied .

Protected pages

A protected page can only be opened by signed-in users, optionally limited to certain roles. Visitors who are not signed in are sent to the sign-in screen and brought back afterwards; signed-in users of the wrong role see Access denied.

When to use

  • Staff areas: dashboards, job boards, data grids.
  • Customer portals: "My quotes", "My bookings".
  • Anything that should not be reachable by typing the address.

Public pages (the default) are open to everyone, including search engines.

How to protect a page

  1. Open Users → Roles & permissions and scroll to Page access.
  2. In the row of the page, choose Who can open it: - Public — anyone - Signed-in users — every role that is signed in - Specific roles — tick the roles that may open it; full-access roles are always included
  3. The change applies immediately in the preview and after the next publish.

Modal and drawer pages are listed too and can be protected the same way. The page's badge in the inspector (Public / Signed-in users / Specific roles) shows the current setting.

What visitors experience

  • Not signed in, protected page: redirected to /login?next=/the-page. After signing in they return to that page (same-app addresses only); otherwise they go to the After sign-in page.
  • Signed in, role not allowed: the built-in Access denied screen, or your own page if you set one under Settings → System pages → Access denied.
  • Navigation: pages the visitor cannot open are left out of the menu automatically. The storyboard shows which pages each role can reach.
  • Builder preview: use Preview as to see the app as a given role; sign-in is simulated there.
Example
Dashboard      Specific roles: Staff, Admin
My requests    Signed-in users
Home, Pricing  Public

Pages and data are protected separately

Protecting a page stops people from opening it. It does not by itself stop them from reading the records shown on it: that is decided by entity permissions and record-level rules. Set both — a customer who cannot open Dashboard should also not be able to read Jobs.

Common mistakes

  • Authentication turned off. Protected pages then cannot be reached by anyone; the Page access table shows a warning.
  • Protecting the home page. Signed-out visitors are redirected straight to sign-in on arrival, which may be what you want for an internal tool, but not for a public site.
  • System pages that require sign-in. The Not found, Access denied and Session expired pages must be public standard pages.
  • Using Visibility instead of page access. A Show only when rule hides components but does not protect the page or the data.

Advanced

A page has requiresAuth and allowedRoles (empty = every signed-in role). On the server, canAccessPage filters the delivered configuration: denied pages are kept as stubs (so the shell can redirect to sign-in instead of showing Not found) and their components are removed before the configuration leaves the server.

Related

Was this helpful?