Skip to content

[6.x] Add config to control default state of Super Admin toggle#14927

Open
stoffelio wants to merge 1 commit into
statamic:6.xfrom
stoffelio:feature/configurable-default-super
Open

[6.x] Add config to control default state of Super Admin toggle#14927
stoffelio wants to merge 1 commit into
statamic:6.xfrom
stoffelio:feature/configurable-default-super

Conversation

@stoffelio

@stoffelio stoffelio commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

When creating a new user via the control panel wizard, the system currently only checks if the authenticated user is allowed to create new super users. If so, the "Super User" toggle is always active by default. This is risky as it can easily be overlooked when creating new users, giving people full access to the app that were never meant to get those privileges.

One of my clients has specifically asked to have this toggled off by default, as they create a lot of subscriber accounts via the wizard and are worried that one of their staff might forget to switch the toggle.

This PR adds a new user config variable to do just that. Everything defaults back to the old behavior, so unless the config variable is added and explicitly set to false, nothing will change.

Tests courtesy of Claude.

Closes statamic/ideas#1467

The user creation wizard defaults the "Super Admin" toggle to on for
any super user creating an account, making it easy to grant super
admin unintentionally. This adds a `statamic.users.wizard_default_super`
config option (default `true`, preserving current behaviour) so the
toggle can be made an explicit opt-in by setting it to `false`.

The toggle default is still gated on `canCreateSupers`, so a non-super
creator can never end up with a pre-checked super toggle, and the
server-side guard in the store method is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jasonvarga

Copy link
Copy Markdown
Member

I don't think we need the config. We can just make it default to off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User creation wizard always defaults to super=true

2 participants