Packageindex Classtrees Modulegroups Elementlist Report XML Files

pxdb_privs

pxdb_privs

private class pxdb_privs

 

Public Method Summary

array get(string $type, [ integer $id, mixed $ugid ])
Gets all privs for a field / user-group ID.
boolean is_readable(string $type, [ integer $id, mixed $ugid ])
Is a particular field readable by a particular ugid?
boolean is_writeable(string $type, [ integer $id, mixed $ugid ])
Is a particular field writeable by a particular ugid?
void grant(string $type, integer $id, mixed $ugid, [ string $priv ])
Grant priv(s) to a particular ugid for a particular rec/field id.

Private Method Summary

boolean _has_priv(string $type, string $priv_label, [ integer $id, mixed $ugid ])
Tests if a ugid has the priv_label passed, public api invokes this
boolean revoke(string $type, [ integer $id, mixed $ugid, string $priv ])
Revoke privileges for a particular user to a particular
string _id_col(string $type)
Get ID column for type
string _table(string $type)
Get table for type
string _priv_col(string $priv)
Privileges are stored in columns -- we can assume a systematic relationship

Public Method Details

get

public array get(string $type, [ integer $id, mixed $ugid ])

 

Parameter
string $type
('field, 'record')
integer $id = >>null<<
mixed $ugid = >>null<<
Array or comma-separated list.
Returns array


is_readable

public boolean is_readable(string $type, [ integer $id, mixed $ugid ])

 

Parameter
string $type
field or record
integer $id = >>null<<
typesfield or reocord id
mixed $ugid = >>null<<
array or commasep list of user/group ids
Returns boolean


is_writeable

public boolean is_writeable(string $type, [ integer $id, mixed $ugid ])

 

Parameter
string $type
integer $id = >>null<<
mixed $ugid = >>null<<
Returns boolean


grant

public void grant(string $type, integer $id, mixed $ugid, [ string $priv ])

 

Parameter
string $type
integer $id
mixed $ugid
string $priv = >>'read'<<
Returns void


Private Method Details

_has_priv

private boolean _has_priv(string $type, string $priv_label, [ integer $id, mixed $ugid ])

  method via is_readable, is_writeable

Parameter
string $type
string $priv_label
'write', 'read'...
integer $id = >>null<<
mixed $ugid = >>null<<
Returns boolean


revoke

private boolean revoke(string $type, [ integer $id, mixed $ugid, string $priv ])

  If ugid is null, then all privs for record are revoked.

Parameter
string $type
integer $id = >>null<<
mixed $ugid = >>null<<
string $priv = >>null<<
Returns boolean

Success


_id_col

private string _id_col(string $type)

 

Parameter
string $type
Returns string

'fid' for a field type or 'recid' otherwise


_table

private string _table(string $type)

 

Parameter
string $type
Returns string

'field_priv' for field type or 'priv' otherwise


_priv_col

private string _priv_col(string $priv)

  between the type of priv (e.g. 'read','write','add',etc.) and the column name. HOWEVER, this function exists so that that systematic relationship is not forced.

Parameter
string $priv
Returns string

col name



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