121 $default_access = $CONFIG->default_access;
124 if ($CONFIG->allow_user_default_access) {
127 $user_access =
$user->getPrivateSetting(
'elgg_default_access');
128 if ($user_access !== null) {
129 $default_access = $user_access;
136 'default_access' => $default_access,
160 $ENTITY_SHOW_HIDDEN_OVERRIDE = $show_hidden;
161 return $current_value;
433 if (!isset(
$options[
'access_id'])) {
438 $where =
"e.access_id = '{$options['access_id']}'";
486 $access = (int) $entity_access_id;
491 $access_array = array(
498 if (array_key_exists(
$access, $access_array)) {
504 $write_access_array =
_elgg_services()->accessCollections->getWriteAccessArray();
506 if (array_key_exists(
$access, $write_access_array)) {
507 return $write_access_array[
$access];
511 return $translator->translate(
'access:limited:label');
536 return ($is_admin ||
_elgg_services()->access->getIgnoreAccess());
559 $init_finished =
true;
622 $value[] = $CONFIG->path .
'engine/tests/ElggCoreAccessCollectionsTest.php';
623 $value[] = $CONFIG->path .
'engine/tests/ElggCoreAccessSQLTest.php';
get_access_array($user_guid=0, $site_guid=0, $flush=false)
Returns an array of access IDs a user is permitted to see.
delete_access_collection($collection_id)
Deletes a specified access collection and its membership.
if($guid==elgg_get_logged_in_user_guid()) $name
access_init()
A quick and dirty way to make sure the access permissions have been correctly set up...
elgg_list_entities_from_access_id(array $options=array())
Lists entities from an access collection.
if(!$autoload_available) _elgg_services()
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
elgg_register_plugin_hook_handler($hook, $type, $callback, $priority=500)
Register a callback as a plugin hook handler.
get_access_collection($collection_id)
Get a specified access collection.
update_access_collection($collection_id, $members)
Updates the membership in an access collection.
access_test($hook, $type, $value, $params)
Runs unit tests for the access library.
remove_user_from_access_collection($user_guid, $collection_id)
Removes a user from an access collection.
elgg_get_ignore_access()
Get current ignore access setting.
get_user_access_collections($owner_guid, $site_guid=0)
Returns an array of database row objects of the access collections owned by $owner_guid.
$init_finished
A flag to set if Elgg's access initialization is finished.
elgg_check_access_overrides($user_guid=0)
Decides if the access system should be ignored for a user.
get_members_of_access_collection($collection, $idonly=false)
Get all of members of an access collection.
elgg_set_ignore_access($ignore=true)
Set if Elgg's access system should be ignored.
add_user_to_access_collection($user_guid, $collection_id)
Adds a user to an access collection.
elgg_is_admin_user($user_guid)
Check if the given user has full access.
$ENTITY_SHOW_HIDDEN_OVERRIDE
Allow disabled entities and metadata to be returned by getter functions.
elgg global
Pointer to the global context.
get_access_list($user_guid=0, $site_guid=0, $flush=false)
Return a string of access_ids for $user_guid appropriate for inserting into an SQL IN clause...
get_readable_access_level($entity_access_id)
Return the name of an ACCESS_* constant or an access collection, but only if the logged in user has w...
access_get_show_hidden_status()
Return current status of showing disabled entities.
elgg_register_event_handler($event, $object_type, $callback, $priority=500)
Register a callback as an Elgg event handler.
elgg_list_entities(array $options=array(), $getter= 'elgg_get_entities', $viewer= 'elgg_view_entity_list')
Returns a string of rendered entities.
access_show_hidden_entities($show_hidden)
Show or hide disabled entities.
elgg_get_entities_from_access_id(array $options=array())
Return entities based upon access id.
has_access_to_entity($entity, $user=null)
Can a user access an entity.
can_edit_access_collection($collection_id, $user_guid=null)
Can the user change this access collection?
$user_guid
Avatar remove action.
_elgg_get_access_where_sql(array $options=array())
Returns the SQL where clause for enforcing read access to data.
get_write_access_array($user_guid=0, $site_guid=0, $flush=false)
Returns an array of access permissions that the user is allowed to save content with.
create_access_collection($name, $owner_guid=0, $site_guid=0)
Creates a new access collection.
elgg_override_permissions($hook, $type, $value, $params)
Overrides the access system if appropriate.
get_default_access(\ElggUser $user=null)
Gets the default access permission.