Protected Attributes | |
$_special_access_id | |
This is a special ephemeral ID that we use to allow a manager to create a login, and add that login to its pool. More... | |
Protected Attributes inherited from CO_Access | |
$_data_db_object | |
This is the instance of the class representing the "data" database. This will always be instantiated. More... | |
$_security_db_object | |
This is the instance of the class representing the "scurity" database. This may not be instantiated, if there is no login. More... | |
$_login_id | |
This is an integer, containing the security DB ID of the logged-in user. It will be NULL for no login. More... | |
Additional Inherited Members | |
Public Attributes inherited from CO_Access | |
$valid | |
This will be true, if the instance is "valid" (has at least an initialized "data" database). More... | |
$error | |
If there was an error, it will be held here. More... | |
$class_description | |
This is a brief textual description of the class. More... | |
$version | |
This will contain the BADGER Version. More... | |
Definition at line 41 of file co_chameleon.class.php.
CO_Chameleon::__construct | ( | $in_login_id = NULL , |
|
$in_hashed_password = NULL , |
|||
$in_raw_password = NULL , |
|||
$in_api_key = NULL |
|||
) |
The constructor.
$in_login_id | The login ID |
$in_hashed_password | The password, crypt-hashed |
$in_raw_password | The password, cleartext. |
$in_api_key | An API key, for REST. |
Reimplemented from CO_Access.
Definition at line 49 of file co_chameleon.class.php.
References __CHAMELEON_VERSION__.
CO_Chameleon::count_all_login_objects_with_access | ( | $in_security_token | ) |
You give a security ID, and you will get a count of all login objects that have that token in their list (or are of that ID).
This is not restricted, and will count logins that we don't otherwise know about.
It does not count the "God" admin, which always has access.
$in_security_token | An integer, with the requested security token. |
Definition at line 142 of file co_chameleon.class.php.
CO_Chameleon::fetch_backup | ( | ) |
This is a special "God Mode-Only" method that dumps everything in both databases. It is used to generate a CSV backup file.
The user must be logged in as "God."
Definition at line 66 of file co_chameleon.class.php.
References CO_Access\god_mode().
CO_Chameleon::get_all_collections_for_element | ( | $in_element | ) |
This method chacks all the collections for the presence of the given element. If the collection is a direct parent of the element, it is returned.
$in_element | The element we're looking for parents. |
Definition at line 106 of file co_chameleon.class.php.
References CO_CHAMELEON_Lang_Common\$co_collection_error_code_item_not_valid, CO_CHAMELEON_Lang\$co_collection_error_desc_item_not_valid, CO_CHAMELEON_Lang\$co_collection_error_name_item_not_valid, and CO_Access\generic_search().
CO_Chameleon::get_all_login_objects_with_access | ( | $in_security_token, | |
$and_write = false |
|||
) |
You give a security ID, and you will get an array, with the login objects that have that token in their list (or are of that ID).
This is security restricted, and will not return logins that we don't otherwise know about.
$in_security_token | An integer, with the requested security token. |
$and_write | If true, then we only want ones we have write access to. |
Reimplemented from CO_Access.
Definition at line 155 of file co_chameleon.class.php.
CO_Chameleon::get_all_user_objects_with_access | ( | $in_security_token | ) |
You give a security ID, and you will get an array, with the user objects, associated with login objects that have that token in their list (or are of that ID).
This is security restricted, and will not return users that we don't otherwise know about.
$in_security_token | An integer, with the requested security token. |
Reimplemented from CO_Access.
Definition at line 169 of file co_chameleon.class.php.
CO_Chameleon::get_all_visible_logins | ( | ) |
Definition at line 360 of file co_chameleon.class.php.
CO_Chameleon::get_all_visible_users | ( | ) |
Definition at line 352 of file co_chameleon.class.php.
CO_Chameleon::get_lang | ( | $in_login_id = NULL | ) |
This returns the language string for the given user/login.
If there is a user item associated with the login, then that gets first dibs. Login item gets dibs over default server.
$in_login_id | The integer login ID to check. If not-NULL, then the ID of a login instance. It must be one that the current user can see. |
Reimplemented from CO_Access.
Definition at line 182 of file co_chameleon.class.php.
References CO_Access\get_login_item(), and get_user_from_login().
CO_Chameleon::get_object_for_key | ( | $in_key | ) |
$in_key | This is the key that we are searching for. It must be a string. |
Definition at line 257 of file co_chameleon.class.php.
References CO_Access\generic_search().
CO_Chameleon::get_security_ids | ( | $no_personal = false | ) |
This fetches the list of security tokens the currently logged-in user has available. This will reload any non-God Mode IDs before fetching the IDs, in order to spike privilege escalation. If they have God Mode, then you're pretty much screwed, anyway.
$no_personal | This is optional. If we DO NOT want personal tokens included, this should be set to true. Default is false (include personal tokens). |
Reimplemented from CO_Access.
Definition at line 86 of file co_chameleon.class.php.
References $_special_access_id.
CO_Chameleon::get_user_from_login | ( | $in_login_id = NULL | ) |
$in_login_id | The login ID that is associated with the user collection. If NULL, then the current login is used. |
Definition at line 368 of file co_chameleon.class.php.
References CO_Access\generic_search(), and CO_Access\get_login_id().
Referenced by get_lang().
CO_Chameleon::get_value_for_key | ( | $in_key, | |
$in_classname = 'CO_KeyValue_CO_Collection' |
|||
) |
$in_key | This is the key that we are searching for. It must be a string. |
$in_classname | This is the class to search for the key. The default is the base class. |
Definition at line 227 of file co_chameleon.class.php.
References CO_Access\generic_search().
CO_Chameleon::key_is_unique | ( | $in_key, | |
$in_classname = 'CO_KeyValue_CO_Collection' |
|||
) |
$in_key | The key to test (a string). |
$in_classname | This is the class to search for the key. The default is the base class. |
Definition at line 247 of file co_chameleon.class.php.
CO_Chameleon::set_value_for_key | ( | $in_key, | |
$in_value, | |||
$in_classname = 'CO_KeyValue_CO_Collection' |
|||
) |
This sets a value to a key, creating the record, if need be. Passing in NULL will delete the key (if we have write access). We need to have a login for it to work at all. If the value already exists, then we need to have write access to it, or we will fail.
$in_key | This is the key that we are setting. It must be a string. |
$in_value | The value to set. If NULL, then we will delete the key. |
$in_classname | This is the class to use for the key. The default is the base class. |
Definition at line 276 of file co_chameleon.class.php.
References CO_CHAMELEON_Lang_Common\$co_key_value_error_code_instance_failed_to_initialize, CO_CHAMELEON_Lang_Common\$co_key_value_error_code_user_not_authorized, CO_CHAMELEON_Lang\$co_key_value_error_desc_instance_failed_to_initialize, CO_CHAMELEON_Lang\$co_key_value_error_desc_user_not_authorized, CO_CHAMELEON_Lang\$co_key_value_error_name_instance_failed_to_initialize, CO_CHAMELEON_Lang\$co_key_value_error_name_user_not_authorized, CO_Access\generic_search(), CO_Access\make_new_blank_record(), and CO_Access\security_db_available().
CO_Chameleon::test_access | ( | $in_login_id | ) |
This tests a login ID for the special "Heisenberg" one-time test.
$in_login_id | The ID of the instance to test. |
Definition at line 204 of file co_chameleon.class.php.
References CO_Access\get_login_item(), and CO_Access\security_db_available().
|
protected |
This is a special ephemeral ID that we use to allow a manager to create a login, and add that login to its pool.
Definition at line 42 of file co_chameleon.class.php.
Referenced by get_security_ids().