125 if ($CONFIG->allow_user_default_access) {
128 $user_access =
$user->getPrivateSetting(
'elgg_default_access');
129 if ($user_access !== null) {
138 'input_params' => $input_params,
161 $ENTITY_SHOW_HIDDEN_OVERRIDE = $show_hidden;
162 return $current_value;
434 if (!isset(
$options[
'access_id'])) {
439 $where =
"e.access_id = '{$options['access_id']}'";
485 return _elgg_services()->accessCollections->getReadableAccessLevel($entity_access_id);
510 return ($is_admin ||
_elgg_services()->session->getIgnoreAccess());
533 $init_finished =
true;
596 $value[] = $CONFIG->path .
'engine/tests/ElggCoreAccessCollectionsTest.php';
597 $value[] = $CONFIG->path .
'engine/tests/ElggCoreAccessSQLTest.php';
604 $events->registerHandler(
'ready',
'system',
'access_init');
607 $hooks->registerHandler(
'permissions_check',
'all',
'elgg_override_permissions', 600);
608 $hooks->registerHandler(
'container_permissions_check',
'all',
'elgg_override_permissions', 600);
610 $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.
get_access_collection($collection_id)
Get a specified access collection.
get_members_of_access_collection($collection_id, $guids_only=false)
Get all of members of an 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.
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...
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
access_get_show_hidden_status()
Return current status of showing disabled entities.
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
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.
if(!$user instanceof ElggUser) $default_access
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.