usergroup_class Class Reference

A group is the part of Monitor's ACL that glues together rights with users. More...

Inheritance diagram for usergroup_class:
object_class

Public Member Functions

 __construct ($name=null)
 constructor
 banish_object ($user=true)
 delete_object ()
 get_default_object ()
 Obtains the default settings for new object of the type we're currently manipulating.
 get_objects_for_user ($obj_type=false)
 Thin wrapper for returning user's objects of an optionally specified type.
 get_object_by_name ($group)
 get_object_name ()
 Returns the name of the object in question.
 save_object ($user=true)
 validate_object ()
 Validates an object prior to saving it to database.
 object_exists ($obj, $id)
 get_properties ()
 Fetches the properties for the current object type.

Static Public Member Functions

static get_groups ()
static persist ()
 Write to file.

Data Fields

 $lazy_write = false
 If true, don't automatically generate cgi.cfg - performance option when handling many users.
 $properties
 This object's properties (required vars, allowed values etc).
 $type = 'group'
 type name

Detailed Description

A group is the part of Monitor's ACL that glues together rights with users.

A user is part of one or more groups (she's always part of an implicit group called "user_*username*"), and the groups in turn contain names of access rights which all members inherits.


Member Function Documentation

usergroup_class::banish_object ( user = true  ) 
Returns:
boolean

Reimplemented from object_class.

usergroup_class::delete_object (  ) 
Returns:
boolean

Reimplemented from object_class.

static usergroup_class::get_groups (  )  [static]
Returns:
array of groupnames
usergroup_class::get_object_by_name ( group  ) 
Parameters:
$group 
Returns:
array|false if object does not exist

Reimplemented from object_class.

usergroup_class::object_exists ( obj,
id 
)
Parameters:
$obj ignored
$id string groupname
Returns:
boolean

Reimplemented from object_class.

static usergroup_class::persist (  )  [static]

Write to file.

Exceptions:
RuntimeException 
usergroup_class::save_object ( user = true  ) 
Parameters:
$user boolean = true
Returns:
boolean

Reimplemented from object_class.

usergroup_class::validate_object (  ) 

Validates an object prior to saving it to database.

This function ensures that the object being validated:

  • has all the required variables
  • doesn't rely on an object that doesn't exist
  • has valid input for 'int', 'bool' and 'checkbox' fields

Reimplemented from object_class.


Field Documentation

usergroup_class::$properties
Initial value:
 array(
                'var_index' => array(
                        'name' => 'string',
                        'access_rights' => 'mselect'
                ),
                'default' => array(
                        'access_rights' => array()
                ),
                'required' => array(
                        'name'
                ),
                'special' => array(),
                'topic' => 'name'
        )

This object's properties (required vars, allowed values etc).

Reimplemented from object_class.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 18 Feb 2013 for nacoma by  doxygen 1.6.1