Skip to content
Snippets Groups Projects
Commit e1b74204 authored by Lily Yan's avatar Lily Yan
Browse files

ISTWCMS-3923 Create default permissions for end-user roles authoring during install

parent 6aaa4675
No related branches found
No related tags found
No related merge requests found
<?php
/**
* @file
* Install, update and uninstall for Configuration of all common WCMS.
*/
use Drupal\uw_cfg_common\UwPermissions\UwPermissions;
/**
* Implements hook_install().
*/
function uw_cfg_common_install() {
$permissions_to_process = [
'Blog' => [
'Use content type' => [
'Site manager',
'Content author',
'Content editor',
],
'Create/edit tags' => [
'Site manager',
'Content author',
'Content editor',
],
'Delete tags' => [
'Site manager',
],
],
'Event' => [
'Use content type' => [
'Site manager',
'Content author',
'Content editor',
],
'Create/edit tags' => [
'Site manager',
'Content author',
'Content editor',
],
'Delete tags' => [
'Site manager',
],
'Create/edit types' => [
'Site manager',
'Content author',
'Content editor',
],
'Delete types' => [
'Site manager',
],
],
'News' => [
'Use content type' => [
'Site manager',
'Content author',
'Content editor',
],
'Create/edit tags' => [
'Site manager',
'Content author',
'Content editor',
],
'Delete tags' => [
'Site manager',
],
],
'Site footer' => [
'Use content type' => [
'Site manager',
'Content author',
'Content editor',
],
],
/*'Special alert' => [
'Use content type' => [
'Site manager',
'Content author',
'Content editor',
],
],*/
'Web page' => [
'Use content type' => [
'Site manager',
'Content author',
'Content editor',
],
],
];
UwPermissions::uw_grant_revoke_permissions($permissions_to_process, 'grant');
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment