Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Similar to how Drupal 7 provides an 'administrator' role by default (with all permissions), we can and should do the same for the Admin Role module.
Comment | File | Size | Author |
---|---|---|---|
#1 | 642130-adminrole-install-D6.patch | 670 bytes | Dave Reid |
Comments
Comment #1
Dave ReidAttached is the simle adminrole.install file that I'm using on my production sites that removes a step that I had to perform manually.
Comment #2
Dave ReidComment #3
Bevan CreditAttribution: Bevan commentedI didn't apply or test functionality yet (I trust you have), but here are some notes;
We need a
@file
header.We should add
hook_uninstall()
if we are adding ahook_install()
.I'm not sure this is a good idea, since it might be a security vulnerability (for existing sites). Maybe we should also check that the role has certain permissions like "administer site configuration".
Maybe we should also check for roles like 'admin', and possibly others? E.g.
WHERE name IN ('admin', 'administrator').
At the end we need adminrole module to do it's thing – set all permissions for that role.
This review is powered by Dreditor.
Comment #4
Dave ReidYeah I'm seeing a point that we shouldn't do anything if there is a role name that starts with 'admin' since they might have already started using proper permissions. Committed a modified version of the patch to CVS.
Comment #5
Bevan CreditAttribution: Bevan commentedPlease upload the patch here and link to the CVS commit message/page; one of these; http://drupal.org/project/cvs/128621
Thanks!
Comment #6
Dave ReidSorry, I already deleted the patch files I had made.
CVS commit for 6.x: http://drupal.org/cvs?commit=293940
CVS commit for 5.x: http://drupal.org/cvs?commit=293942