Allowed Switcher Roles
Restrict which WordPress roles are allowed to start a switch session.
Navigate to SwitchGuard → Settings → Access Control → Allowed Switcher Roles.
Settings
| Setting | Default | Description |
|---|---|---|
| Allowed Switcher Roles | (none selected) | Only users whose role matches one of the checked options can start a switch session. |
Default Behaviour (No Roles Selected)
When no roles are checked, SwitchGuard falls back to WordPress default behaviour: any user with the edit_users capability can initiate switching. This is the Administrator role on standard installs.
Role-Based Restriction
When one or more roles are selected:
- Only users whose WordPress role matches a checked role can switch.
- The
edit_userscapability check is replaced by the role membership check. - The role-hierarchy guard (actor must outrank target in level) still applies regardless of which mode is active.
Checking a role that does not normally hold edit_users (e.g. Editor or Shop Manager) grants those users the ability to start switching sessions. Only check roles you fully trust with user access.
Leaving all boxes unchecked is the safest default — only administrators with edit_users can switch. Add additional roles only when your workflow genuinely requires it.
Common Configurations
| Use Case | Configuration |
|---|---|
| Admin-only switching (default) | Leave all unchecked |
| Allow Shop Managers to assist customers | Check Shop Manager |
| Allow Admins and Editors | Check Administrator and Editor |
Relationship with Role Hierarchy
Allowing a role to initiate switching does not remove the hierarchy restriction on targets. An Editor granted switching access still cannot switch into another Editor or an Administrator — the target must have a strictly lower privilege level.
See Role Hierarchy for level details.