• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Admin Control Panel for Super Admins Only

Veer

Well-known member
#1
Hello,

Is there a way to hide the "Admin Control Panel" link from non-super admin users and also restrict access to admin.php ?

ACP.png
 

Brogan

XenForo moderator
Staff member
#2
I'm not sure I understand, why are they Administrators if they can't access the ACP?

Restricting access to admin.php can be achieved using .htaccess, for example:
Code:
<Files admin.php>
AuthType Basic
AuthName "ACP"
AuthUserFile "path_to_passwd_file"
Require valid-user
</Files>
 
F

Floris

Guest
#4
admin.php > appearance > templates > find: moderator_bar and inside it find this code:
Code:
<a href="admin.php" class="acp adminLink"><span class="itemLabel">{xen:phrase admin_control_panel}</span></a>
and replace it with this code:
Code:
<xen:if is="{$visitor.user_id} == 1">
	<a href="admin.php" class="acp adminLink"><span class="itemLabel">{xen:phrase admin_control_panel}</span></a>
</xen:if>
And save the template. The super-admin is usually user id 1, otherwise change it.