Arena  1.0
A content management system
 All Classes Files Functions Variables Pages
Plugins.User.Subscriptions.Rights Class Reference

A utility class to make managing rights easier. More...

Public Member Functions

def zip
 Zip the rights in the specified iterable into a string that represents each right (useful for storing rights information in a database). More...
 
def unzip
 Unzip the rights in the specified string into a list of rights (useful for retrieving rights information from a database). More...
 
def validate
 Validate that the specified list of rights contains only those rights which are allowed. More...
 

Static Public Attributes

dictionary allowedRights
 The rights allowed to exist within a rights string. More...
 

Detailed Description

A utility class to make managing rights easier.

Member Function Documentation

def Plugins.User.Subscriptions.Rights.unzip (   Self,
  rights 
)

Unzip the rights in the specified string into a list of rights (useful for retrieving rights information from a database).

def Plugins.User.Subscriptions.Rights.validate (   Self,
  rights 
)

Validate that the specified list of rights contains only those rights which are allowed.

def Plugins.User.Subscriptions.Rights.zip (   Self,
  rights 
)

Zip the rights in the specified iterable into a string that represents each right (useful for storing rights information in a database).

Member Data Documentation

dictionary Plugins.User.Subscriptions.Rights.allowedRights
static
Initial value:
1 = {
2  "r": Right.toRead,
3  "m": Right.toEdit,
4  "w": Right.toPost,
5  "y": Right.toComment,
6  "d": Right.toDelete,
7  "C": Right.toInsert,
8  "D": Right.toRemove,
9  "M": Right.toModify
10  }

The rights allowed to exist within a rights string.


The documentation for this class was generated from the following file: