Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
knowledge
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
knowledge
Commits
ac3678e9
Commit
ac3678e9
authored
Sep 12, 2024
by
Steven Ayers
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3473842
: Governance setting roles should be inclusive
parent
8323fc48
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!6
Issue #3473842 by bluegeek9: Governance setting roles should be inclusive
Pipeline
#281211
failed
Sep 12, 2024
Stage: build
Stage: validate
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
config/install/knowledge.governance.settings.yml
+1
-4
1 addition, 4 deletions
config/install/knowledge.governance.settings.yml
config/schema/knowledge.schema.yml
+3
-6
3 additions, 6 deletions
config/schema/knowledge.schema.yml
src/Form/GovernanceForm.php
+5
-5
5 additions, 5 deletions
src/Form/GovernanceForm.php
with
9 additions
and
15 deletions
config/install/knowledge.governance.settings.yml
+
1
−
4
View file @
ac3678e9
roles
:
exclude
:
anonymous
:
anonymous
authenticated
:
authenticated
roles
:
{
}
This diff is collapsed.
Click to expand it.
config/schema/knowledge.schema.yml
+
3
−
6
View file @
ac3678e9
...
...
@@ -99,9 +99,6 @@ knowledge.governance.settings:
label
:
'
governance
settings'
mapping
:
roles
:
type
:
mapping
mapping
:
exclude
:
type
:
sequence
sequence
:
type
:
string
...
...
This diff is collapsed.
Click to expand it.
src/Form/GovernanceForm.php
+
5
−
5
View file @
ac3678e9
...
...
@@ -69,10 +69,10 @@ final class GovernanceForm extends ConfigFormBase {
foreach
(
$roles
as
$machine_name
=>
$role
)
{
$options
[
$machine_name
]
=
$role
->
label
();
}
$form
[
'
exclude
'
]
=
[
'#type'
=>
'
select
'
,
'#title'
=>
$this
->
t
(
'
Exclude
'
),
'#default_value'
=>
$settings
->
get
(
'roles
.exclude'
)
,
$form
[
'
roles
'
]
=
[
'#type'
=>
'
checkboxes
'
,
'#title'
=>
$this
->
t
(
'
When the user has one of these roles
'
),
'#default_value'
=>
$settings
->
get
(
'roles
'
)
??
[]
,
'#options'
=>
$options
,
'#multiple'
=>
TRUE
,
];
...
...
@@ -86,7 +86,7 @@ final class GovernanceForm extends ConfigFormBase {
public
function
submitForm
(
array
&
$form
,
FormStateInterface
$form_state
):
void
{
$this
->
config
(
'knowledge.governance.settings'
)
->
set
(
'roles
.exclude
'
,
$form_state
->
getValue
(
'
exclude
'
))
->
set
(
'roles'
,
$form_state
->
getValue
(
'
roles
'
))
->
save
();
parent
::
submitForm
(
$form
,
$form_state
);
}
...
...
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
sign in
to comment