Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2006, 10:25 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I Limit some Admin CP options to SUPER ADMIN?

I have a coadmin that helps me run the forum spart of my site but there are a number of things that also show up in the AdminCP that he just doesn't need access to as obviously a few clicks here or there can cause me real problems...

How can I use the SUPER ADMIN in a conditional to hide some links off the left in the AdminCP... Then, how would I edit some of the more critical files to lock them down as well?

Thanks!
Reply With Quote
  #2  
Old 05-06-2006, 11:29 PM
brvheart's Avatar
brvheart brvheart is offline
 
Join Date: Jul 2005
Posts: 477
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. dont make them a superadmin, you can have an admin that is not a superadmin
2. After making them an admin you choose via the admincp to restrict what you want them to be able to see etc...do this by going to your admincp. choose uergroups, at the bottom choose "Administrator Permissions" then choose the admin that you want to limit.
Reply With Quote
  #3  
Old 05-06-2006, 11:38 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Correct...

My issue is with some of the custom add-ons....

Photopost Links
SR Classifieds
Photopost
etc....

WIth those I need to hand code it with a conditional ...

<If superadmin> .... then show code.... </if>

I just don't know how to verify if a user is a superadmin...
Reply With Quote
  #4  
Old 05-07-2006, 01:43 AM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The definition of superadmin: An admin with a superior and unlimited power.

As for limiting links to superadmins only, if I were you I'd ask them authors of those hacks to implements some sort of permissions...
Reply With Quote
  #5  
Old 05-07-2006, 11:24 AM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, from insite adminpermissions.php I see the following code:

Code:
if (!in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'], -1, PREG_SPLIT_NO_EMPTY)))
{
	print_stop_message('sorry_you_are_not_allowed_to_edit_admin_permissions');
}
So, if I want to make this work in reverse, can I remove the ! as follows?

Code:
if (in_array($vbulletin->userinfo['userid'], preg_split('#\s*,\s*#s', $vbulletin->config['SpecialUsers']['superadministrators'], -1, PREG_SPLIT_NO_EMPTY)))
{
	Option belongs in here;
}
EDIT - OK, the first code locks non-superadmins out of a file... I just want to also hide the admin option.... where are the option sin the left of teh AdminCP stored and how can I add a conditional to them in a similar way to the second code above?

OK, I think I found the code.... not that I know just how to use it yet?

It looks to me like the permissions for the navigation in the AdminCp is defined in the /includes/xml/ files...

For example:

<navgroup phrase="sr_classifieds" permissions="canadminusers" displayorder="15">


I see similar files for things like vBa, my classifieds, my links directory, etc....

I went into the adminpermissions.php file and I am still quite clueless how this all works....

I would really like to know how I can add new areas under the "Admin Permssions" area such as (Can Administer Classifieds, Can Administer Links, Can Administer vBAdvanced) then use those permissions as assignd to the Admin group to selectively show these CP options....

Perhaps this is too complicated for what I am going to gain from doing this...
Reply With Quote
  #6  
Old 05-09-2006, 01:32 AM
bradyb bradyb is offline
 
Join Date: Apr 2006
Location: Australia
Posts: 19
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wouldn't you just assign yourself as superadmin, add your userid to the superadmin and undeletable users in the config.php then add anohter administrator, then edit the permissions to not be able to access certain features like usergroups, options etc??
Reply With Quote
  #7  
Old 05-09-2006, 07:18 PM
Quarterbore Quarterbore is offline
 
Join Date: Mar 2005
Location: Valley Forge PA
Posts: 538
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by bradyb
Wouldn't you just assign yourself as superadmin, add your userid to the superadmin and undeletable users in the config.php then add anohter administrator, then edit the permissions to not be able to access certain features like usergroups, options etc??
The problem is that not all additions you will add to your site are controled by Admin permissions settings... So, on my board I have two accounts that I have set up fro myself... both are SuperAdmins...

The Primary is the one I post From 99% of the time
The Secondary is a backup in case I get hacked
I have a Co-Admin but he is not a coder and one wrong click could cause me a nightmare

So, I still need to figure this out one of these days...
Reply With Quote
  #8  
Old 09-15-2009, 11:08 PM
[email protected] vbmenu_register("postmenu_1885476", true);
Guest
 
Posts: n/a
Default

I know what he means. Example is giving and admin the ability to edit a user. However I don't them to have access to the email list / send functions. Can it be broken out or hidden?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 05:07 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03903 seconds
  • Memory Usage 2,230KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (7)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete