Admin Control Panel for Super Admins Only

Veer

Well-known member
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.webp
 
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>
 
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.
 
Top Bottom