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
8bb538d8
Commit
8bb538d8
authored
Oct 11, 2021
by
Vijay Hawoldar
Committed by
Ammar Alakkad
Oct 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow updating of new_user_signups_cap on group
parent
cdff3a38
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
ee/app/controllers/ee/groups_controller.rb
ee/app/controllers/ee/groups_controller.rb
+2
-1
ee/spec/controllers/ee/groups_controller_spec.rb
ee/spec/controllers/ee/groups_controller_spec.rb
+33
-0
No files found.
ee/app/controllers/ee/groups_controller.rb
View file @
8bb538d8
...
...
@@ -71,7 +71,8 @@ module EE
def
group_params_ee
[
:membership_lock
,
:repository_size_limit
:repository_size_limit
,
:new_user_signups_cap
].
tap
do
|
params_ee
|
params_ee
<<
{
insight_attributes:
[
:id
,
:project_id
,
:_destroy
]
}
if
current_group
&
.
insights_available?
params_ee
<<
:file_template_project_id
if
current_group
&
.
feature_available?
(
:custom_file_templates_for_namespace
)
...
...
ee/spec/controllers/ee/groups_controller_spec.rb
View file @
8bb538d8
...
...
@@ -615,5 +615,38 @@ RSpec.describe GroupsController do
end
end
end
context
'when `new_user_signups_cap` is specified'
do
subject
{
put
:update
,
params:
params
}
shared_examples_for
'updates the attribute'
do
it
'updates the attribute'
do
subject
expect
(
response
).
to
have_gitlab_http_status
(
status
)
expect
(
group
.
reload
.
new_user_signups_cap
).
to
eq
(
result
)
end
end
context
'authenticated as group owner'
do
where
(
:new_user_signups_cap
,
:result
,
:status
)
do
nil
|
nil
|
:found
10
|
10
|
:found
end
with_them
do
let
(
:params
)
do
{
id:
group
.
to_param
,
group:
{
new_user_signups_cap:
new_user_signups_cap
}
}
end
before
do
group
.
add_owner
(
user
)
sign_in
(
user
)
end
it_behaves_like
'updates the attribute'
end
end
end
end
end
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