Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
f5b3194b
Commit
f5b3194b
authored
3 years ago
by
Liam Morland
Browse files
Options
Downloads
Patches
Plain Diff
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
!153
ISTWCMS-5085: Prevent non-admin access to menu add, edit, and delete
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_cfg_common.module
+3
-3
3 additions, 3 deletions
uw_cfg_common.module
with
3 additions
and
3 deletions
uw_cfg_common.module
+
3
−
3
View file @
f5b3194b
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment