Packageindex Classtrees Modulegroups Elementlist Report XML Files

record_privs

record_privs

private class record_privs

with record related privileges by encapsulating calls to the pxdb_privs class and adding more convenient methods. Methods should be called statically

Authors

 

Public Method Summary

array getAllGroups(object [unknown] &$record)
Returns an array of groups and their privileges to a record. Includes
void grant(int $record_id, int $ugid, string $priv)
Grant privileges to a user or group for a given record
void revoke(int $record_id, int $ugid, string $priv)
Remove privileges to a user or group for a given record
boolean hasPriv(integer $record_id, mixed $ugid, string $priv)
Tests to see if a ugid already has an entry in privs for a given record
boolean update(integer $record_id, int $ugid, string $priv, int $setting)
Updates a priv for a given record and user/group id

Included files Summary, Type: require_once

dirname(__FILE__).'/pxdb_privs.class.php' Warning: documentation is missing.

Public Method Details

getAllGroups

public array getAllGroups(object [unknown] &$record)

  ugid 0, the global group.

Parameter
object [unknown] &$record
Returns array


grant

public void grant(int $record_id, int $ugid, string $priv)

 

Parameter
int $record_id
The ID of the record to which the user should get privs
int $ugid
The ID of the user or group record that gets privs to the record
string $priv
'read' or 'write'
Returns void


revoke

public void revoke(int $record_id, int $ugid, string $priv)

 

Parameter
int $record_id
The ID of the record to which the user should be denied privs
int $ugid
The ID of the user or group record that loses privs to the record
string $priv
'read' or 'write'
Returns void


hasPriv

public boolean hasPriv(integer $record_id, mixed $ugid, string $priv)

 

Parameter
integer $record_id
mixed $ugid
Single ugid or array of ugids
string $priv
'read' or 'write'
Returns boolean


update

public boolean update(integer $record_id, int $ugid, string $priv, int $setting)

 

Parameter
integer $record_id
int $ugid
Single ugid
string $priv
'read' or 'write'
int $setting
either 0 or 1 (shoulda used a boolean)
Returns boolean


Included Files, Type: require_once

dirname(__FILE__).'/pxdb_privs.class.php'

require_once( dirname(__FILE__).'/pxdb_privs.class.php' )



Packageindex Classtrees Modulegroups Elementlist Report XML Files
Generated on Fri, 28 Apr 2006 19:07:22 -0400 by PHPDoc v1.5 www.phpdoc.de