Overide Message and Event Write Permssions

I have an Elgg site with several hundred groups. I want any registered user to be able to add an event or post a comment/message to any group, regardless of their membership to that group.

I see from this thread that you can overide permissions with a plugin. I've asked for help on that thread but no one has responded:


Can anyone point me in the right direction? I tried modifying the only permissions hook I could find in the groups start.php file but it did not seem to alter the functionality.

Thanks in advance.


  • I still haven't solved this issue. I created a plugin with the following code in my start.php file. I kind of found the subtype idea in the tidypics plugin code, so I thought this would work. Any ideas are much appreciated. Thanks!

    function myplugin_permissions_check($hook_name, $entity_type, $return_value, $parameters) {
    	$entity = $parameters['entity'];
    	if (isloggedin() == true) {
    		if ($entity->subtype == get_subtype_id('object', 'album')) {
    			return true;
    		if ($entity->subtype == get_subtype_id('object', 'image')) {
    			return true;
    		if ($entity->subtype == get_subtype_id('object', 'event')) {
    			return true;
    		if ($entity->subtype == get_subtype_id('object', 'message')) {
    			return true;
    		return false;
    register_plugin_hook('permissions_check', 'object', 'myplugin_permissions_check');
  • I think you may be going about this from the wrong direction ;)
    Read around the Groups' logic some more to find references to code such as :-
    to locate the permissions needed for posting to a Group.

  • Thanks, DhrupDeScoop. I'll take a look and see if I can make that work.

  • So, I modified the "group_gatekeeper" function to return true in the cases I need. But, when trying to add an event to a group I do not belong to, I now get:




    Unable to save new object's base entity information!


    So, I got passed my initial hurdle, but I must have not done this correctly because Elgg's security is still preventing users from creating albums or events in groups that they do not belong to.

    Any ideas would be seriously appreciated!

  • Many thanks, Andras. Your help finally helped me solve this problem!