While this usually doesn't matter, this is a pet peeve of mine: after install the user with UID = 1 doesn't have the 'administrator' role. So, if you make something check for that role (ie. a View, Rule, etc), the all powerful super user will be strangely excluded. :-)
We should fix this!
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | panopoly-fix_update_issue-2284273-14.patch | 863 bytes | alan-ps |
| #8 | panopoly-assign_uid_1_to_admin_role-2284273-8.patch | 1.14 KB | alan-ps |
| #6 | panopoly-assign_uid_1_to-2284273-6.patch | 497 bytes | jfrederick |
| #4 | panopoly-assign_uid_1_to-2284273-3.patch | 480 bytes | mglaman |
Comments
Comment #1
mglamanHere's a patch to load the created role and assign UID 1
Comment #2
dsnopekCode looks good, but the identation is off (it's 2 spaces too deep).
Comment #3
mglamanRe-roll!
Comment #4
mglamanUploading proper naming format for branch script.
Comment #5
mglamanMy build off of fork: https://travis-ci.org/mglaman/panopoly/builds/71668353
Comment #6
jfrederick commentedThe previous patch didn't execute the query, so here's an updated one.
Comment #7
dsnopek@jfrederick: Great catch, thanks!
Sorry to keep sending this one back guys, but I think we should also have a
hook_update_N()that does this for existing sites. It'd be great to be able to depend this being set in Apps or add-on modules.We can do this in the same way as we did with the Help block and
_panopoly_install_help_block()Comment #8
alan-ps commentedThis is a patch (in accordance with the above).
Comment #10
dsnopekThanks! This code looks great to me, and the switch to
db_merge()is better too. Worked in my manual testing with a fresh install and upgrading on an old site. Committed!Comment #12
Farliec commentedJust for information, for this patch to work, the admin role name must be administrator
Mine was a long time ago renamed in Administrateur (french word) and because it couldn't find the administrator role, the patch 7103 failed and give the error SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'rid' cannot be null.
Comment #13
dsnopekHrm, yes, this probably should have checked for the existance of the role!
If someone makes a patch wrapping this in an
if ($admin_role) { ... }then I'll review and commit it :-)Comment #14
alan-ps commentedThis is necessary patch :)
Comment #15
dsnopekThanks! Committed :-)