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

Restrict "All Site" Permission Support #193

Open
acekevin opened this issue Jul 14, 2021 · 4 comments
Open

Restrict "All Site" Permission Support #193

acekevin opened this issue Jul 14, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@acekevin
Copy link

Is your feature request related to a problem? Please describe.

We would like to prevent people from creating "All Site" redirects or even see a list of "All Sites" during redirect listing. We support multiple sites and the ability to create a redirect that works on All Sites is dangerous. I know this permission concept was brought up in #50 and closed, but didn't seem to address ability to prevent editing.

Describe the solution you would like

A Retour Setting to deny creation of "All Sites" redirects.

Describe alternatives you have considered

For now we are telling our content editors to make sure they choose an exact site before creating route but we worry its only a matter of time until a content editor makes a mistake and creates an "All Sites" route.

Additional context

Add any other context or screenshots about the feature request here.

@acekevin acekevin added the enhancement New feature or request label Jul 14, 2021
@khalwat
Copy link
Contributor

khalwat commented Jul 14, 2021

What if it looked at the site permissions that the user has access to?

Would that cover your use-case?

So if the user in question has read/write permissions for a particular site, then they would also be able to create redirects for that site.

If a user has read/write permissions for all sites, then they can create redirects for all of the site, as well as the "All Site" redirects.

It seems like a good idea to leverage any existing permissions rather than create a new one.

@alexm-aceable
Copy link

@khalwat my user only has permissions for 1 of 3 sites, but the "All Sites" option still appears in the dropdown.
Screen Shot 2021-07-14 at 5 50 21 PM.

Out of curiosity, is there a safe way to extend this plugin's templates/redirects/*.twig without losing the ability to update easily?

@khalwat
Copy link
Contributor

khalwat commented Jul 15, 2021

Right @alexm-aceable I'm asking whether that would be a good way to go to address this issue.

No, there isn't a way to extend the plugin's templates. What are you attempting to do?

@dean-yump
Copy link

We have this problem too @khalwat and matching the User's permissions for the site would be a perfect solution. Just match this here in the permissions and prevent those without all permissions to even view the "All Sites" view:
image

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
None yet
Development

No branches or pull requests

4 participants