Sign-in levels and access groups
Give the people who sign in to your site a level, then choose per page or form who can open it. Signed-out visitors are sent to sign in; people below the level see a short “not available” page. For teams such as a choir or the elders, add access groups. No code and no backend needed.
1. Your site's levels
Every site starts with four levels, lowest first: visitor < member < staff < admin. A page for member is open to members, staff and admins. Rename, add or remove levels (2 to 10) in the site's Sign-in levels section in Settings, or ask the assistant (“add a leader level between member and staff”). With your own AI client:
set_site_levels { "channel_id": "grace", "levels": ["visitor", "member", "leader", "staff", "admin"] }
| Setting | Meaning |
|---|---|
levels | The names, lowest first: lowercase letters, digits, - and _. A level still used by a page, flow, person or rule can't be removed. |
default_level | What everyone who signs in gets when nothing else applies (default: the lowest level). |
login_path | Where signed-out visitors go, e.g. /login. Empty: the Sign in with Studio page when that is on. |
session_cookie | The sign-in cookie levels use. Leave it at session unless your own sign-in flow uses another name. |
2. Give people a level
- One person: in the Sign-in levels section, pick a level next to their name, or type an email address and choose a level (it works before they ever sign in). Tool:
set_visitor_level { "email": "pat@example.com", "level": "staff" }. - Everyone at a domain: a rule such as “everyone @gracechurch.org is a member”. Tool:
set_level_rule { "kind": "email_domain", "value": "gracechurch.org", "level": "member" }. - An invitation: “pat@example.com is staff once they sign in”:
set_level_rule { "kind": "invited_email", ... }. - From a flow: the
set_visitor_levelstep, for example after a visitor enters a join code (see Flows).
When several apply, a level set for the person wins, then an invitation, then a domain rule, then the default level. Levels belong to the person on your site, not to one sign-in, so they stay when people sign in again. A change applies from their next page view. The people list shows everyone who signed in with Sherman Studio or through your own sign-in flow, with their level and where it comes from.
3. Lock pages and forms
In Pages, each page has an access picker: Public, Signed in, or a level and up. Forms & flows has the same picker. Or ask the assistant (“make /staff staff-only”). Tools:
set_access_level { "channel_id": "grace", "path": "/staff", "access": "staff" }
set_access_level { "channel_id": "grace", "flow": "prayer-list", "access": "member" }
| Visitor | Page | Flow (fetch or form) |
|---|---|---|
| Signed out | Sent to sign in, then back to the page | 401 {"error":"sign in required"}; form posts go to sign in |
| Signed in, below the level | 403 “not available” page | 403 {"error":…, "required_level":"member"} |
| At the level or higher | The page | The flow runs |
The check happens before anything on the page or in the flow runs. To use your own “not available” page, create a template named 403; it can show {{visitor.level}} and {{required_level}}.
4. Show or hide parts of a page
On members-only pages, templates can use the visitor's level:
<p>You're signed in as {{visitor.level}}.</p>
{{#visitor.at_least.staff}}<a href="/staff">Staff area</a>{{/visitor.at_least.staff}}
{{^visitor.at_least.member}}<p>Ask us for a member account.</p>{{/visitor.at_least.member}}
{{#visitor.is.member}}<p>Welcome, member!</p>{{/visitor.is.member}}
Hiding a section only changes what is shown. Keep anything private on a page that needs the level. In flows, use {{session.level}}.
5. Access groups: choir, elders, youth leaders
Levels are one ladder. Access groups are separate sets of people, and anyone can be in several. Use them when a page belongs to a team rather than to everyone above a level. For example, Grace Church has a choir page for the choir and an elders page that needs the member level and the elders group.
1. Create the groups. In Settings, the Sign-in levels section has an Access groups part: type a name and choose Add group. You can rename a group there (pages, forms and people follow). A group still used by a page, form, person or rule can't be removed. Tool:
set_access_groups { "channel_id": "grace", "groups": ["choir", "elders", "youth-leaders"] }
2. Put people in groups. In the people list, use + Group next to a name, or type an email address and choose Add to group (it works before they ever sign in). A rule can add everyone at a domain or an invited address. A form can add people too, with the add_access_group step (see Flows). Someone's groups are all of these together.
set_visitor_access_groups { "channel_id": "grace", "email": "mary@gracechurch.org", "add": ["choir", "elders"] }
set_access_group_rule { "channel_id": "grace", "kind": "invited_email", "value": "new.singer@example.com", "group": "choir" }
3. Limit pages and forms. In Pages and in Forms & flows, the access picker has a group list under the level: tick one or more groups. Anyone in any ticked group gets in. When a level is set too, people need both.
set_access_level { "channel_id": "grace", "path": "/choir", "access": "signed_in", "access_groups": ["choir"] }
set_access_level { "channel_id": "grace", "path": "/elders", "access": "member", "access_groups": ["elders"] }
| Visitor | /choir (signed in + choir) | /elders (member + elders) |
|---|---|---|
| Signed out | Sent to sign in | Sent to sign in |
| Visitor in the choir | The page | 403 “not available” |
| Member in elders | 403 “not available” | The page |
| Visitor in elders | 403 “not available” | 403 (level too low) |
| Admin (the top level) | The page | The page |
The top level sees every group page. People at your site's highest level (admin unless you renamed it) pass every group check, so whoever runs the site can always see and fix these pages. If someone shouldn't see a group's pages, don't give them the top level. A group name the site doesn't have lets nobody in.
A form limited to a group answers 403 {"error":"you're not in an access group that allows this", "required_groups":["elders"], …}. Your own 403 template can show {{required_groups}}.
In templates, show or hide parts by group (for presentation only, as with levels):
{{#visitor.in.choir}}<a href="/choir">Choir rehearsal notes</a>{{/visitor.in.choir}}
{{^visitor.in.elders}}<p>Elders' notes are for elders only.</p>{{/visitor.in.elders}}
<p>Your groups: {{#visitor.groups}}{{.}} {{/visitor.groups}}</p>
In flows, use {{session.groups}}.
Cost
Free. Levels and access groups have no charge of their own: the check is part of the sign-in check members-only pages already do, which is billed as a normal site session read.