I'm the system administrator for a growing multisite drupal installation. One of the things we need to do in our development environment is allow the developers, who have administrator privileges, to run update.php. They need to do this pretty frequently when they upgrade modules. While we want to give them administrator privileges, we need to reserve the UID 1 administrator account for system administrators. The problem for us is that update.php has two modes which are set via settings.php; either the UID 1 account can run it, or anybody can. To use the latter mode, one must edit settings.php by hand, run update.php, and then edit it again. This is pretty awkward for the developers.
A reasonable, simple solution would seem to be to add an 'administer site updates' permission to the system module, and add a check for that in update.php. While the update.php script isn't part of any module, the system module seems to be the logical place for this. I've included a patch for the current development tree.
Comment | File | Size | Author |
---|---|---|---|
#3 | update_perms_drupal7.patch | 3.96 KB | durist |
update_perms_drupal7.patch | 2.22 KB | durist | |
Comments
Comment #1
lilou CreditAttribution: lilou commentedwe need also to change this message :
http://drupal.org/update.php?op=info
Comment #2
gregglesOne simplification: user_access returns true for UID 1 every time, so
could be
Comment #3
durist CreditAttribution: durist commentedHere's an updated patch that addresses comments #1 and #2.
Comment #4
gregglesComment #5
Dave ReidDuplicate of #382874: Add permission to run update.php.
Comment #6
gregglesDuplicate of itself?
Comment #7
Dave ReidHows that for meta linking? :)
I really meant #67234: Update script access rights.
Comment #8
networkgamer CreditAttribution: networkgamer commentedI have the same problem with drupal 6. Is it possible to give another user the permissions for update.php than user 1 ?