Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

[SDPAP-7432] Fixes errors on node creation page #117

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"type": "drupal-module",
"license": "GPL-2.0-or-later",
"require": {
"dpc-sdp/tide_core": "^3.1.13",
"dpc-sdp/tide_core": "^3.2.0",
"dpc-sdp/tide_media": "^3.0.8",
"drupal/create_menus_permission": "^1.0",
"drupal/key_value_field": "^1.3"
Expand Down
4 changes: 3 additions & 1 deletion modules/tide_site_theming/tide_site_theming.module
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
*/
function tide_site_theming_field_group_form_process_alter(array &$element, &$group, &$complete_form) {
// Grant access to site theming fields.
if (!isset($element['#id'])) {
return;
}
if ($element['#id'] == 'tide-site-theming-fileds' || $element['#id'] == 'tide-feature-flag-fields') {
$user = \Drupal::currentUser();
$access_tide_site_theming_fields = 'tide site theming';
if (!$user->hasPermission($access_tide_site_theming_fields)) {
$element['#access'] = FALSE;
return;
}
}
}