I have an Editor role on my drupal site and I add all permission to the role where it can access and manage modals. After I logged in to the user with this role it can't access to the administration page or can't create or manage the modals.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | Captura de tela de 2020-04-09 14-45-58.png | 94.11 KB | ilgnerfagundes |
| #11 | 3120795.patch | 4.17 KB | renatog |
| #8 | fixAccess-3120795-8.patch | 27.55 KB | wil2091 |
| #4 | fixAccess-3120795-4.patch | 2.58 KB | csakiistvan |
Comments
Comment #2
renatog commentedreally makes sense. Thanks for reporting.
It happens because we have a Views with permission
perm: 'administer site configuration'https://git.drupalcode.org/project/modal_page/-/blob/8.x-2.x/config/opti...
We need to fix that to allow views with manage modals permissions.
Comment #3
csakiistvanYou are right, and we need to change the other permissions too https://git.drupalcode.org/project/modal_page/-/blob/8.x-2.x/modal_page....
I can create a patch for that
Comment #4
csakiistvanComment #5
csakiistvanIf I use the #4 patch, the role what use all modal_page permission has access denied page on "admin/structure/modal" and the others page
Comment #6
renatog commentedGood patch @csakiistvan!! Very good! Thanks a lot!
But we need to create as well a hook_update to update this views in website that already have Modal Page installed.
Example: https://git.drupalcode.org/project/modal_page/-/blob/8.x-2.x/modal_page....
Comment #7
renatog commentedP.s. The code probably will be the same.
My recommendation is to create a function called update_modal_page_views () and the hook update call this function
Comment #8
wil2091 commentedI have updated the views configs and added hook_update_n(). Please verify.
Comment #9
wil2091 commentedComment #10
renatog commentedThanks a lot for your help @wil2091
The function
update_modal_page_views();was a good catch!I'll test soon
Thanks
Comment #11
renatog commentedNew patch re-rol
Comment #12
ilgnerfagundes commentedPermission works for a new user who is not an administrator.
Comment #13
renatog commentedTested with new user with new role and really works well now
Comment #15
renatog commentedCommitted to the dev branch. @csakiistvan Thanks for reporting this.
Comment #16
renatog commented