Skip to content

Commit

Permalink
feat(SHS-5907): Update code with some bug fixes and changes, add upda…
Browse files Browse the repository at this point in the history
…te hook for suhumsci to allow site manager to use content access simple
  • Loading branch information
codechefmarc committed Nov 21, 2024
1 parent d2dd874 commit a1c98d5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"php": ">=8.3",
"acquia/blt": "^13.5",
"acquia/blt-multisite": "^1.0",
"codechefmarc/content_access_simple": "1.1.1",
"codechefmarc/content_access_simple": "1.1.2",
"composer/installers": "^1.9",
"cweagans/composer-patches": "^1.7",
"dinbror/blazy": "^1.8",
Expand Down
14 changes: 7 additions & 7 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions config/default/content_access_simple.settings.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
_core:
default_config_hash: QfKnBM3eY89y3dqsdVFRwG5E8H8zr3zGJyin6Bi9TJk
role_config:
hidden_roles:
- anonymous
Expand All @@ -9,3 +7,4 @@ role_config:
- site_manager
debug: false
help_text_view: 'Only the chosen roles will be able to view this content'
unpublished_message: ''
1 change: 1 addition & 0 deletions config/default/user.role.site_manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ permissions:
- 'edit terms in hs_person_staff_type'
- 'edit terms in hs_person_student_type'
- 'edit terms in hs_publication_type'
- 'grant content access simple'
- 'import hs_capx migration'
- 'import hs_events_importer migration'
- 'manipulate entityqueues'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1026,3 +1026,13 @@ function su_humsci_profile_update_9714() {
$role->save();
}
}

/**
* Grants site managers access to the new content access simple module.
*/
function su_humsci_profile_update_9715() {
\Drupal::service('module_installer')->install(['content_access_simple']);
user_role_grant_permissions('site_manager', [
'grant content access simple'
]);
}

0 comments on commit a1c98d5

Please sign in to comment.