Download & Extend

allow admin role to upgrade DB, not just admin user

Project:Drupal core
Version:6.11
Component:database system
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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';

Comments

#1

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...!

AttachmentSizeStatusTest resultOperations
update-D6.patch784 bytesIgnored: Check issue status.NoneNone

#2

Status:needs review» closed (duplicate)

See #67234: Update script access rights