function profile2_og_access_og_permission in Profile 2 7
Same name and namespace in other branches
- 7.2 contrib/profile2_og_access.module \profile2_og_access_og_permission()
Implements hook_og_permission().
File
- contrib/
profile2_og_access.module, line 11 - Profile2 og access integration module.
Code
function profile2_og_access_og_permission() {
$permissions = array();
// Generate per profile type permissions.
foreach (profile2_get_types() as $type) {
$type_name = check_plain($type->type);
$permissions += array(
"edit any {$type_name} profile" => array(
'title' => t('%type_name: Edit any profile', array(
'%type_name' => $type->label,
)),
),
"view any {$type_name} profile" => array(
'title' => t('%type_name: View any profile', array(
'%type_name' => $type->label,
)),
),
);
}
return $permissions;
}