Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 04 Oct 2014, 15:29
alcazarx's Avatar
alcazarx alcazarx is offline
 
Join Date: Jul 2014
Red face Default admin permissions?

Hello Folks,

another small question.
Normally if you edit an administrators permissions, its all set to "No" (if its a new record).
Is there a plugin/option/whatsoever to set this to predefined values? (i. e. see attachment)
Me know that the free software MyBB (boo!) has an "default group permissions" option for this, but we dont need this, since our admins have (mostly) the same permissions.
All we could found in the code is, that when editing an administrator an "empty" record with only the user_id is created in the "administrator" table.
Thanks.
Attached Images
File Type: jpg screen1.jpg (85.7 KB, 5 views)
Reply With Quote
  #2  
Old 04 Oct 2014, 15:32
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Aug 2009
Real name: Chris
No, it was designed that way as most owners might want to assign different permissions to different admins.

It should not take long at all to set up, also it's not like you are adding new admins every ten minutes.
__________________
You can get access to my 180 mods for vB 3.6 - 4.x at The Admin Zone as well as the professional support you are used to. New vBulletin Spider Definitions, vBulletin Spiders List Hits 1000 Spiders! ​ OzzModz down. Site has had a data breach, checking how the intrusion happened. Change your PW if you use the same one on my site and others.
Reply With Quote
  #3  
Old 04 Oct 2014, 22:03
tbworld tbworld is offline
 
Join Date: Oct 2008
Originally Posted by alcazarx View Post
All we could found in the code is, that when editing an administrator an "empty" record with only the user_id is created in the "administrator" table.
Thanks.
Administrator permissions are held in table 'administrator' column 'adminpermissions' as a bit field. You could easily create a query to copy the bit field from one 'userid' to another or handle it manually. Like @Ozzy47 said it is not something you will do every day, but I get the headache.

Please backup your database.
Reply With Quote
  #4  
Old 05 Oct 2014, 10:35
alcazarx's Avatar
alcazarx alcazarx is offline
 
Join Date: Jul 2014
Why not creating a plugin then ozzy?
You did many great plugins here (some we use too)...

@tbworld: You could do also with changing the "default" value of the field, but we didnt want to manipulate the database.
But your idea of "copying the bitfield" lead to the simple solution, thanks.

Simple, but working solution:
Since the "adminpermissions" field is 0 for new admins, just check for it and set the desired value (15605220 for us) before the
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

block. So all permissions that they should have are set to "Yes" then

Background: Of course its not something you do every day, but there is (how do you say in US?) "reorganization in progress" and a merge with another community (they had a different script) so there will be a new "org chart" then .In the end there will be only 2 people with "$config['SpecialUsers']['superadministrators']" so the change above will be removed afterwards.
Thanks, can be closed like the other thread.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Admin can change default style from admin cp Brad vBulletin 2.x Full Releases 45 13 Nov 2003 17:45



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 08:40.

Layout Options | Width: Wide Color: