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
910f69de
Commit
910f69de
authored
4 years ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-3921: updating content access form to save roles after revoking/granting permissions
parent
5c2d828b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Form/UwContentAccessForm.php
+11
-2
11 additions, 2 deletions
src/Form/UwContentAccessForm.php
with
11 additions
and
2 deletions
src/Form/UwContentAccessForm.php
+
11
−
2
View file @
910f69de
...
@@ -90,7 +90,7 @@ class UwContentAccessForm extends FormBase {
...
@@ -90,7 +90,7 @@ class UwContentAccessForm extends FormBase {
}
}
}
}
// Increment the row count
er
.
// Increment the row count.
$row_count
++
;
$row_count
++
;
// Set the functionality column.
// Set the functionality column.
...
@@ -116,10 +116,11 @@ class UwContentAccessForm extends FormBase {
...
@@ -116,10 +116,11 @@ class UwContentAccessForm extends FormBase {
}
}
}
}
// The submit button.
$form
[
'actions'
][
'#type'
]
=
'actions'
;
$form
[
'actions'
][
'#type'
]
=
'actions'
;
$form
[
'actions'
][
'submit'
]
=
array
(
$form
[
'actions'
][
'submit'
]
=
array
(
'#type'
=>
'submit'
,
'#type'
=>
'submit'
,
'#value'
=>
$this
->
t
(
'S
ubmit
'
),
'#value'
=>
$this
->
t
(
'S
ave permissions
'
),
'#button_type'
=>
'primary'
,
'#button_type'
=>
'primary'
,
);
);
...
@@ -186,6 +187,14 @@ class UwContentAccessForm extends FormBase {
...
@@ -186,6 +187,14 @@ class UwContentAccessForm extends FormBase {
}
}
}
}
}
}
// Step through each of the roles and save the role object,
// so that the permissions get saved.
foreach
(
$uw_role_objects
as
$uw_role_object
)
{
// Save the role object.
$uw_role_object
->
save
();
}
}
}
/**
/**
...
...
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