{"action":"created","issue":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/10030","repository_url":"https://api.github.com/repos/Elgg/Elgg","labels_url":"https://api.github.com/repos/Elgg/Elgg/issues/10030/labels{/name}","comments_url":"https://api.github.com/repos/Elgg/Elgg/issues/10030/comments","events_url":"https://api.github.com/repos/Elgg/Elgg/issues/10030/events","html_url":"https://github.com/Elgg/Elgg/issues/10030","id":167798350,"number":10030,"title":"Idea: auto add group_gatekeeper check to entity_gate_keeper","user":{"login":"jdalsem","id":861833,"avatar_url":"https://avatars.githubusercontent.com/u/861833?v=3","gravatar_id":"","url":"https://api.github.com/users/jdalsem","html_url":"https://github.com/jdalsem","followers_url":"https://api.github.com/users/jdalsem/followers","following_url":"https://api.github.com/users/jdalsem/following{/other_user}","gists_url":"https://api.github.com/users/jdalsem/gists{/gist_id}","starred_url":"https://api.github.com/users/jdalsem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdalsem/subscriptions","organizations_url":"https://api.github.com/users/jdalsem/orgs","repos_url":"https://api.github.com/users/jdalsem/repos","events_url":"https://api.github.com/users/jdalsem/events{/privacy}","received_events_url":"https://api.github.com/users/jdalsem/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-27T08:24:58Z","updated_at":"2016-07-27T18:47:08Z","closed_at":null,"body":"if using `elgg_entity_gatekeeper`, you also need to check the group_gatekeeper (if using in resource views). Would it be nice to have the entity_gatekeeper also check the group_gatekeeper for the container of the entity??"},"comment":{"url":"https://api.github.com/repos/Elgg/Elgg/issues/comments/235681828","html_url":"https://github.com/Elgg/Elgg/issues/10030#issuecomment-235681828","issue_url":"https://api.github.com/repos/Elgg/Elgg/issues/10030","id":235681828,"user":{"login":"mrclay","id":170687,"avatar_url":"https://avatars.githubusercontent.com/u/170687?v=3","gravatar_id":"","url":"https://api.github.com/users/mrclay","html_url":"https://github.com/mrclay","followers_url":"https://api.github.com/users/mrclay/followers","following_url":"https://api.github.com/users/mrclay/following{/other_user}","gists_url":"https://api.github.com/users/mrclay/gists{/gist_id}","starred_url":"https://api.github.com/users/mrclay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrclay/subscriptions","organizations_url":"https://api.github.com/users/mrclay/orgs","repos_url":"https://api.github.com/users/mrclay/repos","events_url":"https://api.github.com/users/mrclay/events{/privacy}","received_events_url":"https://api.github.com/users/mrclay/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T18:47:08Z","updated_at":"2016-07-27T18:47:08Z","body":"Hmm, one issue in combining them. Consider this code (e.g. in our own discussion view):\r\n```php\r\nelgg_entity_gatekeeper($guid, 'object', 'discussion');\r\n$topic = get_entity($guid);\r\nelgg_set_page_owner_guid($topic->container_guid);\r\nelgg_group_gatekeeper();\r\n```\r\nHere the group gatekeeper works because it runs after the page owner is set. If we tell people the entity gatekeeper handles it, and they remove the group gatekeeper call, this will no longer provide protection.\r\n\r\nI think in general we should move towards more explicit usage. Maybe group gatekeeper should issue a warning if there's no page_owner set..."}}
{"actor":{"display_login":"mrclay"}}