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

fix: update permissions for institutional managers #219

Merged
merged 4 commits into from
Dec 18, 2024

Conversation

SteelWagstaff
Copy link
Member

@SteelWagstaff SteelWagstaff commented Dec 18, 2024

Allows institutional managers to create new books when registered users are not allowed to and prevents them from accessing pages menu and editing pages on the root site. Fix for #217

To test:

  1. Go to Network Options -> Book & User Registration Settings and uncheck the 'Allow registered users to create and clone new books' option
  2. Log in as an institutional manager and click the 'Create Book' link in the top nav bar. Observe that you can now create new books
  3. Attempt to visit the pages menu on the root site or edit one of the pages. Observe that you see a 'you do not have permission' message
  4. Visit the organize page on any book assigned to your institution and edit a chapter. Observe that you can still edit content in books that belong to your institution.

@SteelWagstaff SteelWagstaff requested a review from arzola December 18, 2024 00:38
@arzola
Copy link
Contributor

arzola commented Dec 18, 2024

I sent a friendly commit to hide the Edit link for institutional managers

Copy link
Contributor

@arzola arzola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arzola arzola merged commit 7159fd6 into dev Dec 18, 2024
@arzola arzola deleted the fix/update-permissions branch December 18, 2024 01:28
@SteelWagstaff
Copy link
Member Author

@arzola your commit also hides the edit button on book pages, which we don't want. I think it would work better if we checked for blog_id === 1 and only hid it there?

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