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
c22e8712
Commit
c22e8712
authored
Jul 02, 2019
by
Fabio Papa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply recomended changes from merge coach
parent
f12636bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
db/migrate/20190626175626_add_group_creation_level_to_namespaces.rb
.../20190626175626_add_group_creation_level_to_namespaces.rb
+0
-1
spec/features/admin/admin_groups_spec.rb
spec/features/admin/admin_groups_spec.rb
+1
-2
spec/features/groups/show_spec.rb
spec/features/groups/show_spec.rb
+9
-6
No files found.
db/migrate/20190626175626_add_group_creation_level_to_namespaces.rb
View file @
c22e8712
...
...
@@ -4,7 +4,6 @@ class AddGroupCreationLevelToNamespaces < ActiveRecord::Migration[5.1]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column
(
:namespaces
,
:subgroup_creation_level
,
:integer
)
...
...
spec/features/admin/admin_groups_spec.rb
View file @
c22e8712
...
...
@@ -107,8 +107,7 @@ describe 'Admin Groups' do
visit
admin_group_edit_path
(
group
)
expect
(
page
).
to
have_select
(
"group_subgroup_creation_level"
,
selected:
::
Gitlab
::
Access
.
subgroup_creation_options
.
keys
[
group
.
subgroup_creation_level
])
expect
(
page
).
to
have_content
(
'Allowed to create subgroups'
)
end
it
'edit group path does not change group name'
,
:js
do
...
...
spec/features/groups/show_spec.rb
View file @
c22e8712
...
...
@@ -57,11 +57,11 @@ describe 'Group show page' do
context
'subgroup support'
do
let
(
:restricted_group
)
do
create
(
:group
,
subgroup_creation_level:
::
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
)
create
(
:group
,
subgroup_creation_level:
::
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
)
end
let
(
:relaxed_group
)
do
create
(
:group
,
subgroup_creation_level:
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
create
(
:group
,
subgroup_creation_level:
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
end
let
(
:owner
)
{
create
(
:user
)
}
...
...
@@ -78,10 +78,11 @@ describe 'Group show page' do
context
'when subgroups are supported'
,
:nested_groups
do
before
do
allow
(
Group
).
to
receive
(
:supports_nested_objects?
)
{
true
}
visit
path
end
it
'allows creating subgroups'
do
visit
path
expect
(
page
)
.
to
have_css
(
"li[data-text='New subgroup']"
,
visible:
false
)
end
...
...
@@ -90,10 +91,11 @@ describe 'Group show page' do
context
'when subgroups are not supported'
do
before
do
allow
(
Group
).
to
receive
(
:supports_nested_objects?
)
{
false
}
visit
path
end
it
'does not allow creating subgroups'
do
visit
path
expect
(
page
)
.
not_to
have_selector
(
"li[data-text='New subgroup']"
,
visible:
false
)
end
...
...
@@ -113,11 +115,12 @@ describe 'Group show page' do
context
'when subgroup_creation_level is set to maintainers'
do
before
do
relaxed_group
.
add_maintainer
(
maintainer
)
path
=
group_path
(
relaxed_group
)
visit
path
end
it
'allows creating subgroups'
do
path
=
group_path
(
relaxed_group
)
visit
path
expect
(
page
)
.
to
have_css
(
"li[data-text='New subgroup']"
,
visible:
false
)
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