The logged in super admin can not pass a permission check #13771
iuriemalai
started this conversation in
General
Replies: 1 comment 1 reply
-
|
We made some changes to how super user authorization works in v6, see the "Super user authorization" section in the upgrade guide.
Out of interest, where did you see "whether it exists as an actual permission or not"? We might need to tweak the docs slightly. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
statamic new statamic-example.test studio1902/statamic-peakAs the Statamic documentation mentions in several places, Super Admin accounts are special accounts with access and permission to everything. Super users can always do everything, so no matter what you check for — whether it exists as an actual permission or not — it will always return true.
Given the mention in point 2 and being logged in with a super admin account, I expected to be able to pass the verification below without any problem. But it was not so. In order not to go into too many details, I will exemplify by putting my code in a closure based route. Even though the current installation is SOLO, the verification is oriented towards the future, when I will switch to Statamic PRO and eventually there will be more users.
[2026-01-31 11:05:35] local.WARNING: Blocked request due to missing permission. {"user":"example-account@example.com"}I will appreciate any information, references about $user->can() and $user->hasPermission() and how they work/must be used in Statamic.
Beta Was this translation helpful? Give feedback.
All reactions