Libraries anvil net Citizen

class Citizen
extends anvil.lang.object

Methods

void addPermission(permission)
Adds permission to citizen's security policy. You may have to call commit() for the citizen to save modification to persistent store (depenging on realm implementation)
Throws OperationFailed -  If error occured file saving to persistent

citizen commit()
Commits changes made to this citizen.
Throws OperationFailed -  If operation failed
AccessDenied -  If security policy denies this operation

tuple getCombinedPermissions()
Returns permissions that this user has (including permissions inherited from groups).
Throws AccessDenied -  If security policy denies this operation

string getName()
Returns the name of citizen.

list getParents()
Returns list of tribe into which this citizen belongs to.
Throws AccessDenied -  If security policy denies this operation

tuple getPermissions()
Returns permissions that this user has.
Throws AccessDenied -  If security policy denies this operation

Realm getRealm()
Returns the realm into which this citizen belongs to.
Throws AccessDenied -  If security policy denies this operation

list getTribes()
Returns list of tribe into which this citizen belongs to.
Throws AccessDenied -  If security policy denies this operation

iterator listPermissions()
Returns iterator of permissions held by this citizen.

void remove()
Removes this citizen
Throws OperationFailed -  If operation failed
AccessDenied -  If security policy denies this operation

void removePermission(permission)
Removes permission from citizen's security policy. You may have to call commit() for the citizen to save modification to persistent store (depenging on realm implementation)
Throws OperationFailed -  If error occured file removing from persistent

boolean setCredentials(string newCredentials)
Sets this citizens crendentials.
Throws AccessDenied -  If security policy denies this operation

boolean verifyCredentials(string password)
Checks if given crendentials matches this citizen's crendentials.