Closed (duplicate)
Project:
Drupal core
Version:
7.x-dev
Component:
user system
Priority:
Normal
Category:
Feature request
Reporter:
Anonymous (not verified)
Created:
29 Nov 2007 at 13:03 UTC
Updated:
21 Aug 2018 at 03:30 UTC
Jump to comment: Most recent
Comments
Comment #1
philippejadin commentedNote (for later) that update.php checks if user id == 1 and so a role woudn't work for update.php
Maybe this ($user->uid == 1) is used elsewhere
How to handle this should be discussed as well
Comment #2
Anonymous (not verified) commentedYes it is used in more than several places and we need to update each one to use the role instead. The killer will be the ppl who've used PHP within the nodes, blocks, etc. to filter on $user->uid == 1. We may need to provide an upgrade path for those.
Comment #3
Chris Johnson commentedInterestingly, I'm only finding 3 places in core (one in update.php, 2 in user.module) where uid == 1 is used. Additionally, there are 4 places where uid != 1 is used (2 in file.inc and 1 each in block.module and upload.module).
So changing core won't be hard.
There are probably a couple hundred in contrib modules, though.
Comment #4
Anonymous (not verified) commentedWell, if it's that simple we might just look at getting a patch out next week. For round one we'll just make sure that uid == 1 always has the administrator role to make contrib life easier. Round two can remove that assurance if we really want to. Do we want the administrator role->rid to be zero to make the upgrade easier? Or should we make it three and roll up each sequential rid to make room for it?
Comment #5
jalbro commentedI was just going to post a question on the forum about this issue, but I found this. I'm glad someone is working on it. The way this is currently implemented doesn't make it clear to the user what is going on or how to extend the roles well. I mean it *feels* like there should be a default administrator role, and it is confusing that there isn't one. This is a great fix.
Is there any "vote for this feature" system for Drupal?
Any way to push for it earlier in the tree? Either version 5 or 6?
-Jeff
Comment #6
Anonymous (not verified) commentedYou just did it.
No. A module containing a patch to core is the only method for this. I wouldn't want to deal with that though. There is an Admin Role module now that might help; I haven't looked at it.
Comment #7
mlncn commentedThis is technically a duplicate of http://drupal.org/node/1597
As noted over there, I'm pushing a related, but distinct approach:
That issue: http://drupal.org/node/182023
Comment #8
mlncn commentedAs noted, duplicate of http://drupal.org/node/1597
benjamin, Agaric Design Collective