Skip to content
Snippets Groups Projects
uw_cfg_common.install 1.82 KiB
Newer Older
Liam Morland's avatar
Liam Morland committed
<?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',
      ],
    ],
Liam Morland's avatar
Liam Morland committed
      'Use content type' => [
        'Site manager',
        'Content author',
        'Content editor',
      ],
Liam Morland's avatar
Liam Morland committed
    'Web page' => [
      'Use content type' => [
        'Site manager',
        'Content author',
        'Content editor',
      ],
    ],
  ];
  UwPermissions::grantRevoke($permissions_to_process, 'grant');
Liam Morland's avatar
Liam Morland committed
}