Permission Constants

The following constants are used to determine what permissions are allocated to a user or group.  Using bitwise operators like | or & a programmer can write templates and pages that respond to user permissions.

  • $P_VIEW
  • $P_EDIT
  • $P_CREATE
  • $P_PUBLISH
  • $P_DELETE
  • $P_MANAGE
  • $P_IMAGES

Example:

  • Check to see if a user has permission to view the current page:
    • if (($Permissions & $P_VIEW)!=0)