function opigno_certificate_update_8001 in Opigno certificate 8
Grand permissions for Content manager global role.
File
- ./
opigno_certificate.install, line 31 - Install, update and uninstall functions for the Opigno Certificate module.
Code
function opigno_certificate_update_8001() {
// Allow platform-level content managers to administer certificates.
$role = Role::load('content_manager');
$role
->grantPermission('administer certificates');
$role
->grantPermission('add certificate entities');
$role
->grantPermission('delete certificate entities');
$role
->grantPermission('edit certificate entities');
$role
->grantPermission('access certificate overview');
$role
->grantPermission('view published certificate entities');
$role
->grantPermission('view unpublished certificate entities');
$role
->save();
}