Skip to content
Snippets Groups Projects
Commit fffc5530 authored by Karthikeyan Manivasagam's avatar Karthikeyan Manivasagam
Browse files

just show uuid in form with permission

parent b894858a
No related branches found
No related tags found
No related merge requests found
...@@ -54,7 +54,7 @@ function edit_uuid_form_alter(&$form, FormStateInterface $form_state, $form_id) ...@@ -54,7 +54,7 @@ function edit_uuid_form_alter(&$form, FormStateInterface $form_state, $form_id)
$form['uuid']['#default_value'] = $entity->get('uuid')->value; $form['uuid']['#default_value'] = $entity->get('uuid')->value;
$form['#validate'][] = 'edit_uuid_form_validate'; $form['#validate'][] = 'edit_uuid_form_validate';
$form['uuid']['#disabled'] = $value->configType(); $form['uuid']['#disabled'] = $value->configType();
$form['uuid']['#disabled'] = !$user->hasPermission('edit edit_uuid'); $form['uuid']['#disabled'] = $user->hasPermission('edit edit_uuid') && !$value->configType() ? FALSE : $value->configType();
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment