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

Admin option - Restrict magazine creation to admins/global moderators #610

Merged
merged 12 commits into from
Apr 6, 2024

Conversation

e-five256
Copy link
Member

@e-five256 e-five256 commented Mar 21, 2024

Adds a new admin panel option, disabled by default, that will restrict creation of new local magazines to admins and global moderators. Magazines added through remotes should be unaffected.

image

  • Admin panel option
  • When enabled:
  • Hide option in header for regular users
  • Hide option in sidebar when logged out
  • Deny access to route for regular users
  • Deny access in API for regular users
  • Only effect local magazines

@TheVillageGuy
Copy link
Contributor

I have this 'hardcoded' on my instance now, so I am in favor

@TheVillageGuy TheVillageGuy marked this pull request as ready for review March 28, 2024 23:41
@e-five256 e-five256 marked this pull request as draft March 28, 2024 23:46
@e-five256

This comment was marked as resolved.

deny magazine create in manager, used in both website and api, though web interface blocks form as well
@e-five256 e-five256 marked this pull request as ready for review March 30, 2024 01:10
@e-five256 e-five256 marked this pull request as draft March 30, 2024 01:12
@e-five256 e-five256 marked this pull request as ready for review March 30, 2024 01:19
@e-five256 e-five256 added the enhancement New feature or request label Mar 30, 2024
@nobodyatroot nobodyatroot added this to the v1.6.0 milestone Apr 5, 2024
@e-five256 e-five256 added the please review I want to be sure what I did won't cause problems label Apr 5, 2024
Copy link
Member

@nobodyatroot nobodyatroot left a comment

Choose a reason for hiding this comment

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

I tested in dev with each user role using this new option both enabled and disabled, PR functions as expected. Also confirmed you're checking for apid == null in the magazine creation, so it shouldn't impact remote magazine creation.

@e-five256 e-five256 merged commit 00cad9c into main Apr 6, 2024
7 checks passed
@e-five256 e-five256 deleted the e5/restrict-mag-creation branch April 6, 2024 13:32
@e-five256 e-five256 removed the please review I want to be sure what I did won't cause problems label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants