Hello,
Is there a specific hook to override elgg acces List ? And is there a list available somewhere with all hook available (I do not see that in the documentation) ?
elgg_view_field([
'#type' => 'access',
'#label' => elgg_echo('access'),
'name' => 'access_id',
'value' => $vars['access_id'],
]);
I would like my user to have public acces for specific entity only if they are member of a specific group. Is there a way to override the acces list easily (or should I regenerate the select input manually) ?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- Arnaud@palarlap
Arnaud - 0 likes
- Jerome Bakker@jeabakker
Jerome Bakker - 0 likes
- Arnaud@palarlap
Arnaud - 0 likes
You must log in to post replies.there is the 'access:collections:write' 'user' hook see http://learn.elgg.org/en/stable/guides/hooks-list.html#permission-hooks
and for the supplied params see https://github.com/Elgg/Elgg/blob/2.3/engine/classes/Elgg/Database/AccessCollections.php#L497-L502
Hi,
Thanks for your answer but that doesn't seem to work.
I have an access field i try to modify
I have created a hook, but $params["entity_type"] and $params["entity_subtype"] are always NULL, so i can not check if it is the right entity i want to modify authorisations to.
I've tried to change the input manually with the code bellow but the public autorisation is still in the list with the message "Missing access level name" (when i create a new entity)
Do you have an idea ?
if you don't provide the input/access with entity_subtype and/or entity_type the hook will not magically get that information.
Look at https://github.com/Elgg/Elgg/blob/master/views/default/input/access.php
Ok, thanks !