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
Changes from 1 commit
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
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;
}
}
}