PDA

View Full Version : [Mini-Hack] Protect Admins in the Admin CP.


Slynderdale
01-14-2003, 10:00 PM
This is just a mini-hack I made, I know theres others like it, but this one is simple and protects admins from being edited, deleted, editing access masks and so on and the options can be changed in config.php, heres the current options:


// which users are allowed to edit the admin usernames
$caneditadmin = "all";
// if they cant edit admins, can they edit them selves?
$caneditadminself = true;

// admins that are protected from others editing them
$protectedadmins = "1";
// can the protected admins edit them selves?
$protectedadminsself = true;


Its pretty much self explanatory, if a unathorized admin tries to edit, delete and so on an admin, they get an error message saying there not allowed to do that.

With the option $caneditadmin, you can control what admins can edit other admins.
With the option $caneditadminself, if set to true, the admin can edit there own account even if there not listed in caneditadmin.

With the option $protectedadmins, no other admin can edit them even of there listed in caneditadmin, this is good for protecting a main admin account from being tampered with.
With the option $protectedadminsself, if set to true, it allows the protected admins to edit there own account.

The $caneditadmin and $protectedadmins can support multiple accounts, each account must be seperated with a comma for example:
$caneditadmin = "1,2,3,6";
or you can use "all" for every admin, for example:
$caneditadmin = "all";

The $caneditadminself and $protectedadminsself can be set to true, if the admin can edit there own account or false if they cant.

ManagerJosh
01-16-2003, 07:12 AM
Excellent! I was looking for a replacement for Chen's modified version! :)

*clicks install*

w596
01-16-2003, 08:08 AM
In your txt file you say...

-------------------------------------
| In admin/config.php find: |
-------------------------------------

?>

-------------------------------------
| above it add: |
-------------------------------------

// which users are allowed to edit the admin usernames
$caneditadmin = "all";
// if they cant edit admins, can they edit them selves?
$caneditadminself = true;

// admins that are protected from others editing them
$protectedadmins = "1";
// can the protected admins edit them selves?
$protectedadminsself = true;


Did you actually mean to say below it add:?

LOL see the next two posts... Thanks for straightening me out scsa20 :D


BTW it works perfectly. ;)

Thanks,
W596

scsa20
01-16-2003, 08:35 AM
no, it's correct, you so'pose to add it above ?>, otherwise it'll just think it's normal text in normal HTML

btw... nice hack, need to install this later :)

w596
01-16-2003, 09:42 AM
LMAO!!!

My Bad... I think maybe I'm dyslexic, I seen it as <?
doh! :)
:p

HHTKAO
01-18-2003, 06:38 AM
This is great, im definitly adding this. nice hack :)

Katana Myronson
02-08-2003, 07:00 PM
Great hack.... its going on to my list of hacks. :)

Sam FT
06-15-2003, 09:30 PM
This is an awesome hack. I had the Total Admin Security by hellsatan for keeping any one from deleting my account. But this is even better with the abiltiy to keep other admins from edit each other.

Chris M
06-16-2003, 01:14 PM
Yesterday at 11:30 PM Music Pirate said this in Post #8 (https://vborg.vbsupport.ru/showthread.php?postid=409362#post409362)
This is an awesome hack. I had the Total Admin Security by hellsatan for keeping any one from deleting my account. But this is even better with the abiltiy to keep other admins from edit each other.

Heh - Total Admin Security can easily be modified to perform the same function;)

Satan