Skip to content

Ensure StatamicUser is checked - #2

Merged
BobWez98 merged 4 commits into
justbetter:masterfrom
indykoning:bugfix/ensure-statamic-user
Apr 17, 2026
Merged

BobWez98 merged 4 commits into
justbetter:masterfrom
indykoning:bugfix/ensure-statamic-user

Conversation

@indykoning

@indykoning indykoning commented Mar 5, 2026 •

Copy link
Copy Markdown
Member

The given user might not actually be of the right type to check permissions yet.
Statamic solves this with the fromUser function
https://github.com/statamic/cms/blob/beef6bebbcaefa30af4643a267db4748ce52ba4a/src/Auth/Eloquent/UserRepository.php#L90

It checks the type and returns the correct statamic user type from it

(we should add a null check now)

@indykoning

indykoning commented Mar 16, 2026 •

Copy link
Copy Markdown
Member Author

@indykoning indykoning changed the title Ensure StatamicUser is checked Ensure StatamicUser is checked Apr 2, 2026
@indykoning indykoning changed the title Ensure StatamicUser is checked Ensure StatamicUser is checked Apr 2, 2026
@BobWez98
BobWez98 merged commit a4acf48 into justbetter:master Apr 17, 2026
7 checks passed
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.

3 participants