26 defined(
'LGV_ACCESS_CATCHER' ) or die ( 'Cannot Execute Directly' );
30 require_once(CO_Config::badger_main_class_dir().'/co_access.class.php');
32 if ( !defined('LGV_LANG_CATCHER') ) {
33 define(
'LGV_LANG_CATCHER', 1);
36 require_once(CO_Config::chameleon_lang_class_dir().
'/common.inc.php');
50 $in_hashed_password = NULL,
51 $in_raw_password = NULL,
54 parent::__construct($in_login_id, $in_hashed_password, $in_raw_password, $in_api_key);
69 $security_db_backup = $this->_security_db_object->get_db_backup();
70 $data_db_backup = $this->_data_db_object->get_db_backup();
72 return [
'security' => $security_db_backup,
'data' => $data_db_backup];
88 $ret = parent::get_security_ids($no_personal);
90 if (isset($this->_special_access_id)) {
92 unset($this->_special_access_id);
110 if (isset($in_element) && $in_element && ($in_element->get_access_object() == $this)) {
111 $collection_objects = $this->
generic_search(Array(
'access_class' => Array(
'%_collection',
'use_like' =>
true)));
113 if (isset($collection_objects) && is_array($collection_objects) && count($collection_objects)) {
114 foreach ($collection_objects as $parent_object) {
115 if ($parent_object->areYouMyDaddy($in_element,
false)) {
119 array_push($ret, $parent_object);
144 return $this->_security_db_object->count_all_login_objects_with_access($in_security_token);
158 return $this->_security_db_object->get_all_login_objects_with_access($in_security_token, $and_write);
171 return $this->_security_db_object->get_all_user_objects_with_access($in_security_token);
184 $ret = parent::get_lang();
191 $ret = $user_item->get_lang();
210 $item_to_test = $this->_security_db_object->get_initial_record_by_id($in_login_id);
213 $ret = $item_to_test->security_exemption();
215 $this->_special_access_id = $in_login_id;
228 $in_classname =
'CO_KeyValue_CO_Collection'
231 $value_object_array = $this->
generic_search(Array(
'access_class' => $in_classname,
'tags' => Array(strval($in_key))));
233 if (isset($value_object_array) && is_array($value_object_array) && count($value_object_array)) {
234 $value_object = $value_object_array[0];
236 $ret = $value_object->get_value();
248 $in_classname =
'CO_KeyValue_CO_Collection'
250 return $this->_data_db_object->tag0_is_unique($in_key, $in_classname);
260 $value_object_array = $this->
generic_search(Array(
'access_class' => Array(
'%_KeyValue%',
'use_like' => 1),
'tags' => Array(strval($in_key))));
262 if (isset($value_object_array) && is_array($value_object_array) && count($value_object_array)) {
263 $ret = $value_object_array[0];
278 $in_classname =
'CO_KeyValue_CO_Collection'
284 $value_object = $this->
generic_search(Array(
'access_class' => $in_classname,
'tags' => Array(strval($in_key))));
286 if ((NULL != $in_value) && (!isset($value_object) || !$value_object)) {
289 $ret = $value_object->set_name($in_key);
290 $ret = $value_object->set_key($in_key);
292 $this->error = $value_object->error;
293 $value_object->delete_from_db();
294 $value_object = NULL;
302 } elseif (isset($value_object) && is_array($value_object) && count($value_object)) {
303 $value_object = $value_object[0];
305 $value_object = NULL;
312 if (NULL == $in_value) {
313 $ret = $value_object->delete_from_db();
315 $ret = $value_object->set_tag(0, $in_key);
317 $ret = $value_object->set_value($in_value);
319 $this->error = $value_object->error;
353 return $this->_data_db_object->get_all_visible_users();
361 return $this->_security_db_object->get_all_visible_users();
374 if (isset($in_login_id) && (0 < intval($in_login_id))) {
375 $login_id = intval($in_login_id);
378 $tag0 = strval($login_id);
380 $ret_temp = $this->
generic_search(Array(
'access_class' => Array(
'%_user_collection',
'use_like' =>
true),
'tags' => Array($tag0)));
382 if (isset($ret_temp) && is_array($ret_temp) && count($ret_temp)) {
if(!defined( 'LGV_LANG_CATCHER'))
const __CHAMELEON_VERSION__
static $co_key_value_error_code_user_not_authorized
static $co_key_value_error_code_instance_failed_to_initialize
static $co_collection_error_code_item_not_valid
static $co_collection_error_desc_item_not_valid
static $co_collection_error_name_item_not_valid
These apply to the *_Collection classes.
static $co_key_value_error_desc_instance_failed_to_initialize
static $co_key_value_error_name_user_not_authorized
These apply to the KeyValue classes.
static $co_key_value_error_desc_user_not_authorized
static $co_key_value_error_name_instance_failed_to_initialize
count_all_login_objects_with_access($in_security_token)
get_all_login_objects_with_access( $in_security_token, $and_write=false)
get_security_ids( $no_personal=false)
get_object_for_key( $in_key)
get_all_collections_for_element( $in_element)
get_user_from_login( $in_login_id=NULL)
key_is_unique( $in_key, $in_classname='CO_KeyValue_CO_Collection')
__construct( $in_login_id=NULL, $in_hashed_password=NULL, $in_raw_password=NULL, $in_api_key=NULL)
test_access( $in_login_id)
get_all_user_objects_with_access($in_security_token)
get_lang( $in_login_id=NULL)
get_value_for_key( $in_key, $in_classname='CO_KeyValue_CO_Collection')
set_value_for_key( $in_key, $in_value, $in_classname='CO_KeyValue_CO_Collection')
$_special_access_id
This is a special ephemeral ID that we use to allow a manager to create a login, and add that login t...
generic_search( $in_search_parameters=NULL, $or_search=false, $page_size=0, $initial_page=0, $and_writeable=false, $count_only=false, $ids_only=false)
make_new_blank_record( $in_classname)
get_login_item( $in_login_id=NULL)
get_login_id( $in_login_id=NULL)
This class provides a general error report, with file, method and error information.