Hi there,
I'm using certain objects as a "base" for other objects ("instances"). Let's say the object is a book, and the instances are reviews to this book. The base-objects I retrieve from an API when a user is searching for this book on my site.
To keep the title of the book up-to-date (object->description) I want to auto-update the title with the new information from the API-call each time a user opens this base-object.
But how can I do this? Usually each object has it's owner, but in my case for other users changing the description should be possible as well. Is it possible to have a "global"-owner (the site-guid, '0') for such base-objects?
Thanks for your ideas!
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.
- iionly@iionly

iionly - 0 likes
- Usage of container_guid: the container_guid of the review is set to the guid of the book object.
- Relationship: created a relationship between the two entities (you could call it "review of") between review and book.
- Viktor@vPriVate

Viktor - 0 likes
- iionly@iionly

iionly - 0 likes
- Viktor@vPriVate

Viktor - 0 likes
You must log in to post replies.Two possibilities:
Thanks for the reply. Of course, to get the "connection" between book and review it is possible to deal with containers or relationships. But I want to change the description of the book (not the review), even if I'm not the owner of it (and as "a" user I'm an admin neither)...
You can disable the access control on the book entity temporarily within the review add/edit action:
You have to assign the correct book entity to $books depending on how you implement the connection between book and review before these lines of codes. If the permission to change the book description depends on some condition, you should include these lines within an if-clause that checks this conditions.
Yeah, that looks good and should work for my purposes.
Danke :)