Each time I upgrade drupal I have to login as the admin user in order to upgrade rather than using my usual user account. I could turn on $update_free_access but that seems a horrific idea. Is there any reason why "admin" role isn't allowed to do this?

--- update.php.orig	2009-05-04 19:06:21.000000000 +0100
+++ update.php	2009-05-04 19:14:55.000000000 +0100
@@ -616,7 +616,8 @@
 ini_set('display_errors', TRUE);
 
 // Access check:
-if (!empty($update_free_access) || $user->uid == 1) {
+if (!empty($update_free_access) || $user->uid == 1
+    || array_search("admin",user_roles())) {
 
   include_once './includes/install.inc';
   include_once './includes/batch.inc';
CommentFileSizeAuthor
#1 update-D6.patch784 byteskprmca

Comments

kprmca’s picture

StatusFileSize
new784 bytes

hi abridgett....!

create a user role "admin" in drupal, and apply this patch then the users who are with admin role can update the drupal...!

David_Rothstein’s picture

Status: Needs review » Closed (duplicate)