Custom Administrator Permissions
Your Hack has an Admin Backend?
Then you should consider protecting it with custom Admin Permissions - not every Admin has to be able to control everything. First of all, you have to decide on a uniqe Key for your Admin Permission, just like your Product ID. In this example I will use canadminmyhack. Go to your ACP File(s) and place the following Code below the Back-End requirement: PHP Code:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> Code:
Varname: can_administer_myhack As the Permissions Editor only takes care of standard Permissions, you must create 4 Plugins: admin_permissions_form PHP Code:
You must also create a Plugin for the Administrator Datamanager admindata_start PHP Code:
admin_permissions_process PHP Code:
can_administer PHP Code:
As you can see, I used customadminperms as the Bitfield. This is the Bitfield I will use for my Hacks, Bit 1 is already in use. If others want to use it too (to avoid having to create there own (Bit)fields) - feel free to do so. But please, first post here and state which Bit you are going to use and wait for an Okay so there won't be conflicts. To use it, create an appropriate Bitfield XML File. The following Install Code should be used then: PHP Code:
PHP Code:
1 - KirbyDE |
Wow. Thanks man!
I may try doing this when I have a few hours. :P |
Thanks Kirby !
now do you know how to add permissions for customs categories ? Like, in vb3.0 I use PHP Code:
thanks for any help. |
Thanks Kirby, this will be very handy.
|
@deathemperor
I don't know what you are talking about; $_CATEGORYOPTIONS does not seem to exist in any standard vBulletin 3.0 file. |
Quote:
I'm thinking if a bitfield_something.xml file would do the trick. |
PHP Code:
PHP Code:
Also, can you please explain what you mean by "Bitfield Usage customadminperms (this will be updated if other Authors use it too)"? TIA :) |
Yep, the ; is missing.
Well "Bitfield Usage customadminperms" just describes how this Bitfield is used, eg. what the Bits stand for :) |
so Kirby, is there any solution for my question ?
|
Yes, Bitfield XMLs are the way to go.
|
All times are GMT. The time now is 07:49 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|