Skip to content
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

[studio] Studio does not honor custom Global Permission Mappings #6093

Closed
3 of 4 tasks
AndyReiter opened this issue May 31, 2023 · 2 comments
Closed
3 of 4 tasks

[studio] Studio does not honor custom Global Permission Mappings #6093

AndyReiter opened this issue May 31, 2023 · 2 comments

Comments

@AndyReiter
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • The issue is in the latest released 4.1.x
  • The issue is in the latest released 4.0.x
  • The issue is in the latest released 3.1.x

Describe the issue

When creating custom Global Permissions, Studio does not honor or reflect the permissions. Users can't create sites, view sites, or use any other functionality that should be granted.

Steps to reproduce

Steps:

  1. Create a new Custom Role Mapping under /data/repos/global/configuration/global-role-mappings-config.xml and map it to the system_admin role.
  2. Run a git add and git commit of the permission file
  3. Start up studio
  4. Log in as the admin user and create a new group that matches the group name of the role you created
  5. Once the new group has been created, create a new user and add it to the new group
  6. Log in as the new user
  7. Attempt to create a site. Notice that the UI get stuck spinning and the network tab says that the user does not have permissions.

Relevant log output

No response

Screenshots and/or videos

image
global-role-mappings-config.zip

@phuongnq
Copy link
Member

phuongnq commented Jun 1, 2023

@sumerjabri @russdanner Regarding the issue, I updated the check from group system_admin to the role system_admin to determine whether a user is a system admin.

For other roles, ex: site admin, developer, etc we still need to set at the site level. Any custom group in global permissions won't take effect. Is this expected or do we want to improve these roles mapping as well?

@phuongnq
Copy link
Member

phuongnq commented Jun 1, 2023

And we also have the API 2 migration in 4.2. 0 which will eventually remove the hard code system_admin group/role checking to actually use the permissions file as it is(?)

Crafter CMS v4 automation moved this from In Progress to Completed Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Crafter CMS v4
  
Completed
Development

No branches or pull requests

4 participants