Skip to content
Snippets Groups Projects
Commit f5b3194b authored by Liam Morland's avatar Liam Morland
Browse files

ISTWCMS-5085: Adjust comments in uw_cfg_common_form_menu_edit_form_alter()

parent 7f109e94
No related branches found
No related tags found
1 merge request!153ISTWCMS-5085: Prevent non-admin access to menu add, edit, and delete
......@@ -470,11 +470,11 @@ function uw_cfg_common_form_node_uw_ct_web_page_edit_form_alter(array &$form, Fo
/**
* Implements hook_form_FORM_ID_alter().
*
* Menu edit form: admin/structure/menu/manage/main.
*
* Prevent certain changes to the home page.
* Menu edit form: admin/structure/menu/manage/{menu}.
*/
function uw_cfg_common_form_menu_edit_form_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
// Prevent certain changes to the home page.
//
// No changes for those with access.
if (\Drupal::currentUser()->hasPermission('bypass home page protection')) {
return;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment