Packageindex Classtrees Modulegroups Elementlist Report XML Files

pxdb_datatype_privs

pxdb_datatype_privs

private class pxdb_datatype_privs

 

Public Method Summary

void pxdb_datatype_privs(mixed $ugid)
Constructor
void set_restrict_datatypes(array $dt_array)
Use to restrict datatypes to a specific subset of ids.
array getAllByDatatype(integer $dt)
Return all privileges for a datatype in an array where key is the ugid field.
void grant(integer $dt, integer $ugid, array $privArray)
Grants the privileges in the privArray to the group on the specified datatype
void revoke_all(integer $dt, integer $ugid)
Deletes all privileges to a dataype for a group

Private Method Summary

void set_exposed(boolean $bool)
Sets the exposed property.that enforces datatypes table's expose column
array get_object_array(string $priv)
Returns an array of objects that the user has the designeated priv on
boolean is_allowed(integer $dt, string $priv_name)
Checks if the priv is allowed
boolean _lookup(integer $dt, string $priv_name)
Looks up the priv in the database
void _cache_save( $dt, $priv, $val)
Saves looked up values in memory
void _cache_check(integer $dt, string $priv_name)
Check if a priv, datatype combo is cached. Returns NULL if its not cached
void getUnassignedGroups(integer $dt, integer $DATATYPE_GROUP)
Returns all groups that do not have a privilege to the datatype
void _add_row(integer $dt, integer $ugid, array $privArray)
Adds a new priv row to the database.
void _update_row(integer $dt, integer $ugid, array $privArray)
Adds a new priv row to the database.
boolean _has_privs_defined(integer $dt, integer $ugid)
Tests if the dt has a row in the database for the group specified
array get_priv_columns()
Returns an array of the defined priv colums

Private Field Summary

unknown $ugid
User group id, can be one or multiple arrays
unknown $exposed
Enforces datatypes table's expose column. Default to on
unknown $restrict_datatypes
restrict to a specific datatype subset
unknown $_cache
Caches looked up values for this ugid

Private Constant Summary

$namec >>$privc<< Warning: documentation is missing.

Public Method Details

pxdb_datatype_privs

public void pxdb_datatype_privs(mixed $ugid)

 

Parameter
mixed $ugid
or array of group ids
Returns void


set_restrict_datatypes

public void set_restrict_datatypes(array $dt_array)

 

Parameter
array $dt_array
datatype ids
Returns void


getAllByDatatype

public array getAllByDatatype(integer $dt)

 

Parameter
integer $dt
id
Returns array


grant

public void grant(integer $dt, integer $ugid, array $privArray)

 

Parameter
integer $dt
integer $ugid
id
array $privArray
is the priv name (read|add|edit|delete|approve), value is 1|0
Returns void


revoke_all

public void revoke_all(integer $dt, integer $ugid)

 

Parameter
integer $dt
integer $ugid
id
Returns void


Private Method Details

set_exposed

private void set_exposed(boolean $bool)

 

Parameter
boolean $bool
Returns void


get_object_array

private array get_object_array(string $priv)

  For example, to get all the objects a group can view: usage: $obj = $privVar->get_object_array( DATATYPE_PRIV_VIEW ); Also, the class will setup constants to use instead of strings based on the priv_ columns in your database table.

Parameter
string $priv
Returns array


is_allowed

private boolean is_allowed(integer $dt, string $priv_name)

 

Parameter
integer $dt
id
string $priv_name
name
Returns boolean


_lookup

private boolean _lookup(integer $dt, string $priv_name)

 

Parameter
integer $dt
string $priv_name
name
Returns boolean


_cache_save

private void _cache_save( $dt, $priv, $val)

 

Parameter
$dt
Warning: documentation is missing.
$priv
Warning: documentation is missing.
$val
Warning: documentation is missing.
Returns void


_cache_check

private void _cache_check(integer $dt, string $priv_name)

 

Parameter
integer $dt
id
string $priv_name
name @retuarn integer or null
Returns void


getUnassignedGroups

private void getUnassignedGroups(integer $dt, integer $DATATYPE_GROUP)

 

Parameter
integer $dt
id
integer $DATATYPE_GROUP
id of the groups datatype
Returns void


_add_row

private void _add_row(integer $dt, integer $ugid, array $privArray)

 

Parameter
integer $dt
integer $ugid
id
array $privArray
is the priv name (read|add|edit|delete|approve), value is 1|0
Returns void


_update_row

private void _update_row(integer $dt, integer $ugid, array $privArray)

 

Parameter
integer $dt
integer $ugid
id
array $privArray
is the priv name (read|add|edit|delete|approve), value is 1|0
Returns void


_has_privs_defined

private boolean _has_privs_defined(integer $dt, integer $ugid)

 

Parameter
integer $dt
integer $ugid
id
Returns boolean


get_priv_columns

private array get_priv_columns()

 

Returns array


Private Field Details

$ugid

private unknown $ugid

>><<


$exposed

private unknown $exposed

>><<


$restrict_datatypes

private unknown $restrict_datatypes

>><<


$_cache

private unknown $_cache

>><<


Private Constant Details

$namec

define( $namec, >>$privc<< )
Case: default: case sensitive



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