Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Please add a simple permission and check for users being able to use HTML in the menu items. I use this module to my top level primary links can have html. I don't want the other users to be able to add html in the menu items.
Thanks.
Comment | File | Size | Author |
---|---|---|---|
#16 | menu.jpg | 42.39 KB | irankhosravi |
#13 | menu_html-permissions-822084-13.patch | 3.27 KB | robinsonsarah01 |
#4 | menu_html_permissions_0.1.patch | 756 bytes | mzwyssig |
Comments
Comment #1
gmclelland CreditAttribution: gmclelland commentedBump, any thoughts on this. Thanks
Comment #2
Alan D. CreditAttribution: Alan D. commentedDouble this. This could be considered a security issue!
Comment #3
mzwyssig CreditAttribution: mzwyssig commentedSubscribing. This would be very useful.
Comment #4
mzwyssig CreditAttribution: mzwyssig commentedAttached is a patch that checks if user has "administer nodes" permissions.
Comment #5
ClaireC CreditAttribution: ClaireC commentedThe patch works for me ! Thanks.
Comment #6
gagarine CreditAttribution: gagarine commentedI think it would be great to commit this...
Comment #7
gagarine CreditAttribution: gagarine commentedComment #8
gagarine CreditAttribution: gagarine commentedI'm going to make a permission like "Use html for menu link". If the user don't have the permission but can edit the menu link the menu link should go back to no HTML. The other possibility is than when a menu link use HTML user without the permission can't edit them. Otherwise it's a security problem...
To be clear, the patch #4 doesn't work. An admin can change the link to "HTML" and a user without the permission can still edit the content and add bad stuff...
Comment #9
webadpro CreditAttribution: webadpro commentedGreat point guys.
Would you guys say to simply not allow to edit the element completely or simply deny access to edit the title, but the user could always change the path, etc.?
Comment #10
gagarine CreditAttribution: gagarine commentedI'm for let the user edit what he can and just disable the title field.
Comment #11
gagarine CreditAttribution: gagarine commentedComment #12
drupov CreditAttribution: drupov commentedHas this patch been commited?
Comment #13
robinsonsarah01 CreditAttribution: robinsonsarah01 commentedAttached is a patch that adds a "use html for menu titles" permission to this module. If a user can administer menus but isn't allowed to use HTML in those menus, the checkbox for "Allow HTML" will not appear; if HTML is enabled, the link title will be disabled and the user will not be able to edit it.
Comment #14
gagarine CreditAttribution: gagarine commentedThis patch look good thanks! Someone was able to test it?
Comment #15
shortspoken CreditAttribution: shortspoken commentedI just tested the patch and it works as advertised. Thank you @robinsonsarah01! Please commit.
Comment #16
irankhosravi CreditAttribution: irankhosravi commentedhello how to logo in center of menu
Comment #17
irankhosravi CreditAttribution: irankhosravi commentedhelp
Comment #18
Alan D. CreditAttribution: Alan D. commented@mehrwebstay
You are very unlikely to get help by jumping into an unrelated thread, especially a project issue on a completely unrelated topic (aka this is to prevent users from inserting HTML).
Try https://www.drupal.org/forum/22 or http://drupal.stackexchange.com/ and be a bit more verbose about what you have tried and what isn't working. :)
Comment #19
irankhosravi CreditAttribution: irankhosravi commentedComment #20
markabur CreditAttribution: markabur commentedLooks good, thank you! RTBC
Comment #21
Chris Matthews CreditAttribution: Chris Matthews commentedWould it be possible to commit the patch in #13 to 7.x-1.x-dev and tag a 7.x-1.1 release?
Comment #22
Chris Matthews CreditAttribution: Chris Matthews commented@maintainers, can the patch in #13 be committed and pushed to a 7.x-1.1 release?