Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
user system
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 Apr 2003 at 00:39 UTC
Updated:
5 May 2009 at 22:37 UTC
A friend and new drupal user suggested that along with anonymous and authenticated, there should be an "administrator" role which behaves just like the first user registered.
It makes sense to me. This way if there is more than one site administrator (or super user), the first admin won't have to update user permissions for the admin role every time a new module is added.
Comments
Comment #1
al commentedComment #2
al commentedPatch in contributions/for_review/
Comment #3
coreb commentedMoving from x.y.z queue to 6.x-dev.
Comment #4
webchickNote that this is a little fancier than just adding a new role... checks for $user->uid == 1 would need to be changed to check the admin role instead, and when saving the modules screen, it would need to auto-add the permissions for any given modules to the role.
It would probably also make sense for this role to be role 1 (to match uid 1), and anon role to be moved to role 0. But this move will probably break existing contrib modules/custom code.
Comment #5
Paul Natsuo Kishimoto commented+1 this.
Proof of need example: I set up a Drupal installation for an organization I'm a member of, with myself as user #1. I leave. Someone else takes over and needs full control over the installation.
Currently, I don't know if anything can be done to give the new administrator full privileges without modifying my UID #1 personal account into theirs. In doing so, all my previous posts/comments become (falsely) attributed to the new admin.
Comment #6
coreb commentedPaul, your example just shows why you shouldn't use that account for your personal account on a group site. I prefer to treat uid=1 on a drupal site the same as root account on a unix machine. Only use it when you have to.
Create a personal account for yourself for everyday interaction on the site, and create roles with more options enabled in access control (for administrators or moderators). Use the uid=1 account only when you need to do really important things.
Let the administration of the organization know the password for the uid=1 account. This way if something ever happens to you, they're not completely out of control of their site (hopefully not, but you never know).
Comment #7
jennycita commentedWow... this bug is nearly 5 years old. Just thought I'd mention (since no one else has) that there's a module which does exactly what you're asking for: http://drupal.org/project/adminrole. Might be nice to have it in core... but it does the job.
Comment #8
vm commentedno bug, it's a feature request.
Comment #9
gábor hojtsyFeatures go to Drupal 7 now. Please start work on this early in the cycle, so you can actually get this in.
Comment #10
mlncn commentedNote: I have a request in for a core admin role that does not clone the superuser. UID 1 would still be special but people would be encouraged to use another account with an admin role for regular administration.
That approach is not mutually exclusive with this approach, which uncouples "super-admin" powers from UID 1, and could even be seen as complementary, giving us these roles: anonymous, authenticated, admin, and (not seen on the user permissions page since it would have all permissions) superadmin.
http://drupal.org/project/adminrole approximates this which is why I consider the more pressing need to get an admin role that can be a superuser equivalent or a step below that, at the users choice, but will encourage people to move away from reliance on the superuser for all administrative tasks and allow modules to give "administer X" permissions to the admin role, getting around the recurring "why don't I see the module I just enabled? oh right I have to assign its permissions" foolishness.
http://drupal.org/node/182023
Comment #11
beginner commentedsee also #64861: META-roles, user registration handling and SPAM registration
Comment #12
Leeteq commented+1. Adds important flexibility.
Comment #13
mlncn commentedPardon my changing the the title to make it clearer and distinguish this issue – making user 1 (superuser or "site owner") permissions role-based – with a configurable yet default administration role.
The only overlap between the issues is the need for numbering. So if there is general approval for uncoupling user 1 from site owner capabilities, we can add the role over in that issue in addition to an administrator role allowing sensible defaults, to handle the renumbering of role IDs all at once, and then come back here to do the work of replacing uid 1 checks with role id checks.
(Alternatively, site owner status could be addressed as a "meta-role" stored as a $user->status.)
benjamin, Agaric Design Collective
Comment #14
sunuid 1 is a special user for good reason; it is like user "root" on Unix-style systems.
In the same way you should not work with user "root" on your computer, you should avoid to work as uid 1 in Drupal.
Special-casing users in a role to have certain, administrative privileges is what #182023: Add a third default role to core for handling Administrative duties is about, which makes more sense than to grant multiple users any permission in the wild.
Thus, marking as duplicate.