diff --git a/uw_cfg_common.install b/uw_cfg_common.install new file mode 100644 index 0000000000000000000000000000000000000000..c5b44612b4fdb49e52a91a095701a427afec7f06 --- /dev/null +++ b/uw_cfg_common.install @@ -0,0 +1,93 @@ +<?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'); + +} +