122 $default_access = $CONFIG->default_access;
125 if ($CONFIG->allow_user_default_access) {
128 $user_access =
$user->getPrivateSetting(
'elgg_default_access');
129 if ($user_access !== null) {
130 $default_access = $user_access;
137 'default_access' => $default_access,
138 'input_params' => $input_params,
162 $ENTITY_SHOW_HIDDEN_OVERRIDE = $show_hidden;
163 return $current_value;
436 if (!isset(
$options[
'access_id'])) {
441 $where =
"e.access_id = '{$options['access_id']}'";
487 return _elgg_services()->accessCollections->getReadableAccessLevel($entity_access_id);
512 return ($is_admin ||
_elgg_services()->session->getIgnoreAccess());
535 $init_finished =
true;
598 $value[] = $CONFIG->path .
'engine/tests/ElggCoreAccessCollectionsTest.php';
599 $value[] = $CONFIG->path .
'engine/tests/ElggCoreAccessSQLTest.php';
606 $events->registerHandler(
'ready',
'system',
'access_init');
609 $hooks->registerHandler(
'permissions_check',
'all',
'elgg_override_permissions');
610 $hooks->registerHandler(
'container_permissions_check',
'all',
'elgg_override_permissions');
612 $hooks->registerHandler(
'unit_test',
'system',
'access_test');
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.
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
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.
get_default_access(ElggUser $user=null, array $input_params=array())
Gets the default access permission.
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.
get_write_access_array($user_guid=0, $site_guid=0, $flush=false, array $input_params=array())
Returns an array of access permissions that the user is allowed to save content with.
$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_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.
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.