Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
e1b74204
Commit
e1b74204
authored
4 years ago
by
Lily Yan
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_cfg_common.install
+93
-0
93 additions, 0 deletions
uw_cfg_common.install
with
93 additions
and
0 deletions
uw_cfg_common.install
0 → 100644
+
93
−
0
View file @
e1b74204
<?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'
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment