Permission class

Permission is a Page type used for storing an individual permission.

One or more Permission objects are attached to Role objects, which are then attached to User objects and Template objects, forming ProcessWire's role-based access control system. Outside of roles, Permission objects are managed with the $permissions API variable.


Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the Permission class also inherits all the methods and properties of: Page, WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
Permission::id int Numeric page ID of the permission.  
Permission::name string Name of the permission.  
Permission::title string Short description of what the permission is for.  
Permission::wired()
(nothing)Wired to API 

Additional methods and properties

In addition to the methods and properties above, Permission also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.228

Latest news

  • ProcessWire Weekly #489
    In the 489th issue of ProcessWire Weekly we'll check out what's new in the core this week, share a brand-new recipe of the week, and more. Read on!
    Weekly.pw / 23 September 2023
  • ProcessWire 3.0.226 new main/master version
    After 8 months in development we are excited to bring you ProcessWire 3.0.226 main/master. This version has a ton of great new features, improvements and optimizations, plus more than 100 issue fixes. This post takes an in-depth look at highlights from this great new version.
    Blog / 25 August 2023
  • Subscribe to weekly ProcessWire news

“To Drupal, or to ProcessWire? The million dollar choice. We decided to make an early switch to PW. And in retrospect, ProcessWire was probably the best decision we made. Thanks are due to ProcessWire and the amazing system and set of modules that are in place.” —Unni Krishnan, Founder of PigtailPundits