
Update commons modules to release 7.12, and move the codebase under modules/commons instead of constant fetching from remote repository. The commons.make file removed so it is not required to rebuild groups distribution. Change-Id: I3be393ba1af34427e2915b18ab1ad718fd4e54db
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
/**
|
|
* @file
|
|
* commons_groups.features.user_permission.inc
|
|
*/
|
|
|
|
/**
|
|
* Implements hook_user_default_permissions().
|
|
*/
|
|
function commons_groups_user_default_permissions() {
|
|
$permissions = array();
|
|
|
|
$groups = commons_groups_get_group_types();
|
|
|
|
if (isset($groups['node'])) {
|
|
foreach ($groups['node'] as $bundle => $group_info) {
|
|
// Exported permission: 'create group content'.
|
|
$permissions["create $bundle content"] = array(
|
|
'name' => "create $bundle content",
|
|
'roles' => array(
|
|
'administrator' => 'administrator',
|
|
'authenticated user' => 'authenticated user',
|
|
),
|
|
'module' => 'node',
|
|
);
|
|
|
|
// Exported permission: 'edit own group content'.
|
|
$permissions["edit own $bundle content"] = array(
|
|
'name' => "edit own $bundle content",
|
|
'roles' => array(
|
|
'administrator' => 'administrator',
|
|
'authenticated user' => 'authenticated user',
|
|
),
|
|
'module' => 'node',
|
|
);
|
|
}
|
|
}
|
|
|
|
return $permissions;
|
|
}
|