http://docs.elgg.org/wiki/PermissionsCheck
The example PHP at the bottom - in some cases "myaccess" is used and in other cases "myaccesss" (extra "s") is used. There needs to be consistency, and preferably the correct spelling method.
What baffles me is that it seems like someone just wrote this code by hand without ever actually testing it out in a live Elgg system. Because in its current state there's no way in hell it would have done *anything* ;)
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.
- Cash@costelloc

Cash - 0 likes
- Kane@kane

Kane - 0 likes
- Cash@costelloc

Cash - 0 likes
- Phil@Phil

Phil - 0 likes
- Cash@costelloc

Cash - 0 likes
You must log in to post replies.OK - accesss changed to access
I believe a lot of the code examples were written without testing by the core developers. Not the best way to introduce people to a platform!
Thanks Cash!
Actually, I don't think that example is even useful at all...with the method described it's impossible to query any entities that don't have access_id = 2 or 1 (PUBLIC or LOGGED_IN). So it doesn't actually override the permissions check at all.
I think the issue may be that the permissions_check override function is not actually called when get_entities() is called.
See this thread - http://community.elgg.org/mod/groups/topicposts.php?topic=185245&group_guid=7
I could be wrong though, that's just from my experience!
I spent some time today fixing the horrible blog tutorial on the wiki. I can see why so many people complain about the documentation. It still needs more cleanup but I think the code is actually functional now.
I'll probably check out the permissions override code and see what state that is in...
What you're doing there is going to save so many people's headaches Cash, well done mate.
I feel like it might be worth having _another_ go now that it's been sorted.
Hey, Kane, I added a warning to that page until the core developers can decide whether they want to allow plugins access to entities that the user does not have read permissions for.
http://docs.elgg.org/wiki/Permissions_Check
If you find more things that can be improved with the documentation, please post them here in this group. Thanks.