Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
58baeb2c
Commit
58baeb2c
authored
Mar 04, 2022
by
Katrin Leinweber
Committed by
Kati Paizee
Mar 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bulk update snippet for project settings
Co-authored-by:
Kati Paizee
<
kpaizee@gitlab.com
>
parent
ee667769
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+20
-0
No files found.
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
58baeb2c
...
...
@@ -771,6 +771,26 @@ group.require_two_factor_authentication=false
group
.
save
```
### Check and toggle a feature for all projects in a group
```
ruby
projects
=
Group
.
find_by_name
(
'_group_name'
).
projects
projects
.
each
do
|
p
|
state
=
p
.
<
feature
-
name
>
?
if
state
puts
"
#{
p
.
name
}
has <feature-name> already enabled. Skipping..."
else
puts
"
#{
p
.
name
}
didn't have <feature-name> enabled. Enabling..."
p
.
project_feature
.
update!
(
builds_access_level:
ProjectFeature
::
PRIVATE
)
end
end
```
To find features that can be toggled, run
`pp p.project_feature`
.
Available permission levels are listed in
[
concerns/featurable.rb
](
https://gitlab.com/gitlab-org/gitlab/blob/master/app/models/concerns/featurable.rb
)
.
## Authentication
### Re-enable standard web sign-in form
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment