Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.0.0
-
Fix Version/s: 4.0.0
-
Component/s: Core CiviCRM
-
Labels:None
Description
This may have been related to CRM-7627, but I also see that no permissions are created for the new 'admin' role. We should do something like the following:
$user_roles = user_roles( );
if ( $user_roles[ 3 ] = 'admin' ) {
$config =& CRM_Core_Config::singleton();
require_once 'CRM/Core/Permission.php';
$permissions =& CRM_Core_Permission::basicPermissions( );
$perms_array = array();
foreach ($permissions as $perm => $title)
user_role_grant_permissions( 3 , $perms_array );
}