Postponed
Project:
Drupal core
Version:
main
Component:
toolbar.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
4 Mar 2020 at 23:22 UTC
Updated:
1 Apr 2026 at 04:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
neslee canil pinto@adriancid, we need to have configuration form for this?
In which we have to have a checkbox , on click of it we will disable "Manage" for non-admin roles.
Comment #3
adriancid@Neslee Canil Pinto I think the idea here is to have new permission, I don't remember the issue where we talked about this and I see now I forgot to link it. I will see if I can find it.
Comment #4
adriancid#3091968: Do not show Search if user does not have the correct permission
Comment #5
neslee canil pintoIs this as been already fixed?
Comment #6
rokzabukovec commentedI created the patch that adds a 'Use Admin Toolbar manage' permission and hides the 'Manage' menu tab based on that permission. I also added some tests that check the presence of that menu element.
My patch does not prevent the user to go to the URLs from the menu, because the issue does not state that this is necessary. It just hides the menu navigation. If any modifications are required let me know.
Best regards
Comment #8
rokzabukovec commentedI fixed the test errors and some coding standards. See the interdiff for changes.
@adriancid can you review it?
Best regards
Comment #9
romainj commentedI think that as the Manage menu item is defined by the core Toolbar module this issue should not be related to the Admin Toolbar module.
Comment #10
romainj commentedComment #11
tripurari commentedReviewing and will update the status shortly.
Comment #12
tripurari commentedI agree with @romainj, permission is already added for toolbar to handle for non-admin-user. It shows Manage if allowed permission to non-admin-user.I think if we allow only toolbar permission to a user, in that case Manage menu should be hidden. In case of adding more permission to non-admin-user like add manage some admin level menu, manage should be visible.
Comment #13
vikashsoni commented#8, #6 Patch is not working sharing screenshot
Comment #14
manojithape commentedComment #15
manojithape commentedComment #16
chetanbharambe commentedVerified and tested patch #8 but it's not applied successfully.
Not working as expected.
Please check the attached screenshot.
Moving to Needs Work.
Comment #17
richa_porwal commentedComment #18
richa_porwal commentedHi Team,
I have created patch for the above problem motivation. Need review.
Comment #19
richa_porwal commentedComment #20
richa_porwal commentedHi Team,
Please use the latest created patch. Need Review
Comment #21
richa_porwal commentedComment #22
manojithape commentedComment #23
manojithape commentedNot able to reproduce this issue.
Comment #24
ambuj_gupta commentedComment #25
ambuj_gupta commentedTesting Steps:
1. Install Drupal 8.9.x
2. log in as an admin.
3. Go to "/admin/people/permissions"
4. And Enable toolbar for Non-Admin Roles.
5. Now create an account with a non-admin role
6. And login with that user.
7. And verify the toolbar.
8. Manage option is coming in the toolbar for non-admin users.(issue Replicate)
9. Now apply patch #20.
10. Verify the toolbar (Issue fixed)
Testing Results:
After applying the patch successfully. The Manage option is hidden from the toolbar for the non-admin user
Note:
When the patch is applied successfully, new permission(Use toolbar manage tab) is added into the toolbar option at "/admin/people/permissions". Using which admin is able to show/hide the manage tab for non-admin users.
Comment #26
ambuj_gupta commentedComment #27
quietone commentedThis needs an issue summary update, see Write an issue summary for an existing issue for guidance.
Comment #28
chetanbharambe commentedComment #29
chetanbharambe commentedVerified and tested patch #20.
Patch applied successfully and looks good to me.
Testing Steps:
# log in as an admin.
# Goto:- /admin/people/permissions
# And Enable toolbar for Non-Admin Roles.
# Now create an account with a non-admin role
# And login with that user.
# And verify the toolbar.
# Manage option is coming in the toolbar for non-admin users.
# Verify the toolbar
Expected Results:
# Menu item ‘Manage’ should be removed for non-admin roles.
Actual Results:
# Currently Menu item 'Manage' is visible for non-admin roles.
Looks good to me.
Can be a move to +1RTBC.
Comment #30
gauravvvv commentedFixed MARKED SNIFF VIOLATIONS, for patch #20, Attached interdiff for same.
please review.
Comment #31
avpadernoDrupal 8.9.x is now open only to security issues.
Comment #33
dwwIs this duplicate with #2135445: Toolbar displays Manage tab even if the user is not permitted to see it?
Comment #35
igork96 commentedI tested this and can confirm that patch from #30 is working with the Drupal 9.4.x version
Comment #36
catch#30 doesn't pass tests and we still need an answer to #33.
Comment #37
igork96 commented@catch I checked the issue, and yes I think it is a duplicate. There the best suggestion is to add a new permission for this to access administration pages, with an update function that grants that permission to all roles that are allowed to use the toolbar but don't have the administration pages permission. Maybe we should close this ticket and move further work there ?
Comment #38
akram khanupdating patch against 9.4.x
Comment #39
akram khanFixing Custom Command failed
Comment #40
prem suthar commented#39 Working Fine For me I tested the patch it updated the Permission Form "Use the toolbar "To "Use toolbar manage tab" in toolbar manage.
As mentioned in #37 Please Add new permission for this to access administration pages.
Comment #41
prem suthar commentedAdd the screenshot For Refernace.
Comment #42
quietone commented@Akram Khan, @Prem Suthar, thank you for your interest in improving Drupal. The comment in #37 suggests that this is a duplicate. That means the next task here is to read this issue and the other one (See #33) to confirm that. Adding patches or screenshots after that comment aren't helping to resolve the issue. You can use the contributor tasks on Drupal.org that provide the steps for making useful additions to an issue. Credit has been removed per How is credit granted for Drupal core issues.
Comment #46
quietone commentedThe Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.
Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.