-
Notifications
You must be signed in to change notification settings - Fork 500
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
AO3-6761 Check admin roles in TagWranglingsController #4937
base: master
Are you sure you want to change the base?
AO3-6761 Check admin roles in TagWranglingsController #4937
Conversation
Huh, that's weird. Just to clarify because I can't pull the code right now: if you're on, e.g., Regardless, I think the fix for that might be changing the link in the sidebar to explicitly check that the params are blank.
(It's possible there's more than one version of this sidebar.) |
@sarken that's actually the case now, not just with the new code... 😬 I don't object to fixing it here, but the main question I had was if we should hide that part of the menu for non-write admins (iirc the ticket doesn't say either way) |
Ah, okay! I thought it was a new bug, and you were asking if the way to deal with it was to hide that particular link while leaving the others visible. I think we can leave the full sidebar visible for anyone with either type of access and just stick to this plan from AO3-6758 for everyone else:
|
(Feel free to fix or make a new issue for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a test for the navbar visibility?
I think it would be nice if you could i18n the wrangler_dashboard, none of the other pull requests touched it so hopefully it shouldn't lead to merge conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
<ul class="navigation actions"> | ||
<% if current_user.is_a?(User) %> | ||
<li><%= span_if_current(ts('Wrangling Home'), tag_wrangler_path(current_user)) %></li> | ||
<% if (logged_in_as_admin? && policy(:wrangling).full_access?) || current_user.try(:is_tag_wrangler?) || @counts %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 I thought this needed to be read_access?
as well but the tests pass without it? Maybe still good to change though so it's not confusing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, it doesn't show on the tags index page, because that one doesn't have @counts
set. So this should be changed and the tests should all start out in the tags index, not the tag wrangling tools
Pull Request Checklist
Issue
https://otwarchive.atlassian.net/browse/AO3-6758
Purpose
Restrict access to PAC (tag bins only) and wrangling/super admins (wrangling tools, mass update)
References
This is probably going to cause conflicts with #4917; please merge that one first if this is in the same release, then I will fix the conflicts.