Jump to content


Photo

How to add a new Permission?


  • Please log in to reply
3 replies to this topic

#1 neildaemond

neildaemond

    Sr. Member

  • Members
  • PipPipPipPip
  • 111 posts
  • 31

  • LocationHong Kong

Posted 02 April 2012 - 08:11 PM

I feel like the list of permissions in the Access>Permissions section isn't exhaustive. There is an 'Add Permission' option, but I don't have a clue as to what I can add in there as it's just a text field.

Is there a list of acceptable permissions somewhere? or a guide on how to use this feature?

Thanks,

#2 Soma

Soma

    Hero Member

  • Moderators
  • 3,183 posts
  • 1733

  • LocationSH, Switzerland

Posted 03 April 2012 - 03:20 AM

Permissions are text based. While there's some already there used by system, you can simply add custom permission you then can use for your module or in templates:

$user->hasPermission("mypermission")

@somartist | modules created | support me, flattr my work flattr.com


#3 apeisa

apeisa

    Hero Member

  • Moderators
  • 2,517 posts
  • 842

  • LocationVihti, Finland

Posted 03 April 2012 - 10:31 AM

I think only permission that PW uses but is not on the list is page-publish. PW will use that if you add it.

#4 neildaemond

neildaemond

    Sr. Member

  • Members
  • PipPipPipPip
  • 111 posts
  • 31

  • LocationHong Kong

Posted 03 April 2012 - 11:24 AM

Thanks guys, it makes a lot more sense now :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users