Skip to content

User guest role inconsistencies #1310

Open
@adrianbj

Description

@adrianbj

Short description of the issue

I've brought this up somewhere else before but can't find it at the moment. The issue is that if you create users via the API, the guest role is not automatically applied to them. What is weird though is that there is a lot of inconsistency is the admin GUI and the API around whether the user actually has the guest role or not. If you edit their user page, it shows that guest is checked, but if you view all users via Access > Users, then the guest role is not listed in the Lister table view for that user and if you filter by users with the guest role, that user also won't show up in the results.

Now if you try these calls:

This does find the user without the guest role

$users->find('roles!=guest');

But this includes that same user:

$users->find('roles=guest');

Surprisingly, it's also possible to do:

$user->removeRole('guest');

and it will actually remove the guest role.

Expected behavior

guest role is automatically added when creating a new user via the API and it is impossible to remove that role.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions