Functions Summary | |
---|---|
int | cot_auth_add_item(string module_name, string item_id, array auth_permit, array auth_lock) Adds a new object into access control lists Usage example: $auth_permit = array( COT_GROUP_DEFAULT => 'R', COT_GROUP_GUESTS => '0',, COT_GROUP_MEMBERS => 'R', 12 => 'RW', // allows Read & Write for group with ID = 12 ); $auth_lock = array( COT_GROUP_DEFAULT => 'A', COT_GROUP_GUESTS => 'W12345A', COT_GROUP_MEMBERS => 'A', 12 => 'R', // cannot change Read for group with ID = 12 ); cot_auth_add_item('test', 'item123', $auth_permit, $auth_lock); |
int | cot_auth_clear(mixed id) Clears user permissions cache |
int | cot_auth_getlevel(int userid, bool maingroup) Returns highest level of all groups a user belongs to. |
string | cot_auth_getmask(int rn) Returns an access character mask for a given access byte |
int | cot_auth_getvalue(string mask) Converts an access character mask into a permission byte |
int | cot_auth_remove_group(int group_id) Removes a user group from auth table |
int | cot_auth_remove_item(string module_name, string item_id) Removes an object from ACL |
void | Optimizes auth table by sorting its rows |
public int cot_auth_add_item(string module_name, string item_id, array auth_permit, array auth_lock)
$auth_permit = array(
COT_GROUP_DEFAULT => 'R',
COT_GROUP_GUESTS => '0',,
COT_GROUP_MEMBERS => 'R',
12 => 'RW', // allows Read & Write for group with ID = 12
);
$auth_lock = array(
COT_GROUP_DEFAULT => 'A',
COT_GROUP_GUESTS => 'W12345A',
COT_GROUP_MEMBERS => 'A',
12 => 'R', // cannot change Read for group with ID = 12
);
cot_auth_add_item('test', 'item123', $auth_permit, $auth_lock);
public int cot_auth_clear(mixed id)
public int cot_auth_getlevel(int userid, bool maingroup)
public string cot_auth_getmask(int rn)
public int cot_auth_getvalue(string mask)
public int cot_auth_remove_group(int group_id)
public int cot_auth_remove_item(string module_name, string item_id)
public void cot_auth_reorder()