Skip to content

[5.x] Fix read-only state of roles and groups fields #11867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 5.x
Choose a base branch
from

Conversation

aerni
Copy link
Contributor

@aerni aerni commented Jun 11, 2025

I noticed that the user_roles and user_groups fields in the user blueprint aren't displayed as read_only even if a user doesn't have the assign roles and assign user groups permissions. This PR fixes that. It's only a UI fix, as the UsersController already guards the fields from being updated without the appropriate permissions.

Before:
CleanShot 2025-06-11 at 19 06 09@2x

After:
CleanShot 2025-06-11 at 19 06 39@2x

I actually went a step further and decided to hide the fields instead of making them read-only. I think this is more appropriate. Users without permission to change their role and group shouldn't be able to see those fields at all. It's just confusing.

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.

1 participant