-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to break roles into separate module
Need to ensure roles are enabled after pieces are in place
- Loading branch information
Showing
4 changed files
with
181 additions
and
283 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: UBC VPR Roles | ||
type: module | ||
description: This module manages user roles for VPR suite of sites. | ||
package: UBC Web Services | ||
dependencies: | ||
- ubc_vpr_homepage_extend:ubc_vpr_homepage_extend | ||
- ubc_vpr_announcement_extend:ubc_vpr_announcement_extend | ||
- ubc_vpr_event_extend:ubc_vpr_event_extend | ||
- ubc_vpr_landing_page_extend:ubc_vpr_landing_page_extend | ||
- ubc_vpr_page_extend:ubc_vpr_page_extend | ||
- ubc_vpr_profile_extend:ubc_vpr_profile_extend | ||
- ubc_vpr_webform_extend:ubc_vpr_webform_extend | ||
- ubc_vpr_shared_config:ubc_vpr_shared_config | ||
core: '8.x' | ||
core_version_requirement: ^8 || ^9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
<?php | ||
|
||
/** | ||
* Implements hook_install(). | ||
* | ||
* @ingroup ubc_vpr_shared_config | ||
*/ | ||
function ubc_vpr_shared_config_install() { | ||
$config = \Drupal::service('config.factory'); | ||
$config->getEditable('user.role.content_creator') | ||
->set('dependencies.config', [ | ||
'filter.format.filtered_text', | ||
'media.type.file', | ||
'media.type.image', | ||
'media.type.private_file', | ||
'media.type.remote_video', | ||
'media.type.svg_icon', | ||
'media.type.video', | ||
'node.type.ubc_announcement', | ||
'node.type.ubc_event', | ||
'node.type.ubc_page', | ||
'node.type.ubc_profile', | ||
'taxonomy.vocabulary.event_category', | ||
]) | ||
->set('dependencies.module', [ | ||
'dropzonejs', | ||
'file', | ||
'filter', | ||
'media', | ||
'media_bulk_upload', | ||
'node', | ||
'scheduler', | ||
'system', | ||
'taxonomy', | ||
'toolbar', | ||
'tour', | ||
'ubc_content_items', | ||
'webform', | ||
]) | ||
->set('permissions', [ | ||
'access taxonomy overview', | ||
'view unpublished content item entities', | ||
]) | ||
->save(); | ||
$config->getEditable('user.role.editor') | ||
->set('dependencies.config', [ | ||
'filter.format.filtered_text', | ||
'media.type.file', | ||
'media.type.image', | ||
'media.type.private_file', | ||
'media.type.remote_video', | ||
'media.type.svg_icon', | ||
'media.type.video', | ||
'node.type.homepage', | ||
'node.type.ubc_announcement', | ||
'node.type.ubc_event', | ||
'node.type.ubc_landing_page', | ||
'node.type.ubc_page', | ||
'node.type.ubc_profile', | ||
'node.type.webform', | ||
'taxonomy.vocabulary.announcement_type', | ||
'taxonomy.vocabulary.department_or_unit', | ||
'taxonomy.vocabulary.event_category', | ||
'taxonomy.vocabulary.profile_affiliated_institution', | ||
'taxonomy.vocabulary.profile_category', | ||
'taxonomy.vocabulary.profile_faculty', | ||
'taxonomy.vocabulary.profile_role', | ||
'taxonomy.vocabulary.research_theme', | ||
'taxonomy.vocabulary.tags', | ||
]) | ||
->set('dependencies.module', [ | ||
'block', | ||
'contextual', | ||
'dropzonejs', | ||
'file', | ||
'file_delete', | ||
'filter', | ||
'google_analytics', | ||
'media', | ||
'media_bulk_upload', | ||
'metatag', | ||
'node', | ||
'paragraphs', | ||
'path', | ||
'redirect', | ||
'role_delegation', | ||
'scheduler', | ||
'system', | ||
'taxonomy', | ||
'toolbar', | ||
'tour', | ||
'ubc_content_items', | ||
'webform', | ||
'webform_node', | ||
]) | ||
->set('permissions', [ | ||
'access webform help', | ||
'access webform overview', | ||
'access webform submission user', | ||
'add content item entities', | ||
'administer taxonomy', | ||
'administer webform', | ||
'administer webform submission', | ||
'create terms in announcement_type', | ||
'create terms in profile_affiliated_institution', | ||
'create terms in profile_category', | ||
'create terms in profile_faculty', | ||
'create terms in profile_role', | ||
'create terms in research_theme', | ||
'create webform content', | ||
'delete all content item revisions', | ||
'delete any webform content', | ||
'delete content item entities', | ||
'delete own webform content', | ||
'delete terms in announcement_type', | ||
'delete terms in profile_affiliated_institution', | ||
'delete terms in profile_category', | ||
'delete terms in profile_faculty', | ||
'delete terms in profile_role', | ||
'delete terms in research_theme', | ||
'delete webform revisions', | ||
'delete webform submissions any node', | ||
'delete webform submissions own node', | ||
'edit any ubc_landing_page content', | ||
'edit content item entities', | ||
'edit own webform content', | ||
'edit own webform submission', | ||
'edit terms in announcement_type', | ||
'edit terms in profile_affiliated_institution', | ||
'edit terms in profile_category', | ||
'edit terms in profile_faculty', | ||
'edit terms in profile_role', | ||
'edit terms in research_theme', | ||
'edit webform submissions any node', | ||
'edit webform submissions own node', | ||
'revert all content item revisions', | ||
'revert ubc_landing_page revisions', | ||
'revert webform revisions', | ||
'view all content item revisions', | ||
'view ubc_profile revisions', | ||
'view unpublished content item entities', | ||
'view unpublished paragraphs', | ||
'view webform revisions', | ||
'view webform submissions any node', | ||
'view webform submissions own node', | ||
]) | ||
->save(); | ||
} | ||
|
||
/** | ||
* Implements hook_uninstall(). | ||
* | ||
* @ingroup ubc_vpr_shared_config | ||
*/ | ||
function ubc_vpr_shared_config_uninstall() { | ||
} | ||
|
||
/** | ||
* sample update. | ||
*/ | ||
/* | ||
function ubc_vpr_shared_config_update_9001() { | ||
} | ||
*/ | ||
|
||
|
Oops, something went wrong.