function og_context_plugin_access_og_perm::access in Organic groups 7.2
Same name and namespace in other branches
- 7 og_context/includes/views/og_context_plugin_access_og_perm.inc \og_context_plugin_access_og_perm::access()
Determine if the current user has access or not.
Overrides views_plugin_access::access
File
- og_context/
includes/ views/ handlers/ og_context_plugin_access_og_perm.inc, line 88 - Contains views access plugin for OG permissions
Class
- og_context_plugin_access_og_perm
- Allow views to allow access to only users with a specified permission in the current group.
Code
function access($account) {
// Attempt to get the group from the current context and determine if the
// user has the appropriate permission within the group
if ($group = og_context($this->options['group_type'])) {
return og_user_access($group['group_type'], $group['gid'], $this->options['perm'], $account);
}
return FALSE;
}