Uutiset:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu
Advertisement:

Adding a Custom permission

Aloittaja Harry D, elokuu 06, 2013, 08:48:43 IP

« edellinen - seuraava »

Harry D

Morning (From the UK),

Don't know if this has already been posted, but can't seem to find this information anywhere else. If you are wanting to add a custom permission, how do you do it? This is for like a moderator permission, but different I don't want to copy the permission, so it then edits the main one.

Thanks in advance,

Harry.

Kindred

adding a permission in what regard?

Adding it to the permissions list is simple.

However, you then have to have some code that checks and makes use of the new permission...
and that can get more complicated.

So, you need to give more details on what you are trying to accomplish.
(note, also moving this to the coding board)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Harry D

Hello,

Yes I am wanting to make a new permission, which as you said looks like I'd require some more code. I don't want to clone it from another permission such as 'Administrator' & 'Moderator' etc.

Harry

Arantor

Adding the permission is easy. There's even a tutorial for it. But what do you want the permission to *do*?
Holder of controversial views, all of which my own.


Chalky

Administrator and (Global) Moderator are not permissions, they are membergroups. Permissions such as "can edit own profile", "can access arcade" are then assigned to membergroups to determine what the members placed in those membergroups are able to do.

So I can't help but ask: do you want to create a new permission or a new membergroup?

Advertisement: