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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
f12636bf
Commit
f12636bf
authored
Jul 01, 2019
by
Fabio Papa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some code style issues
parent
3dc6717c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
+14
-11
spec/features/groups/show_spec.rb
spec/features/groups/show_spec.rb
+8
-4
spec/policies/group_policy_spec.rb
spec/policies/group_policy_spec.rb
+6
-7
No files found.
spec/features/groups/show_spec.rb
View file @
f12636bf
...
...
@@ -56,10 +56,14 @@ describe 'Group show page' do
end
context
'subgroup support'
do
let
(
:restricted_group
)
{
create
(
:group
,
subgroup_creation_level:
::
Gitlab
::
Access
::
OWNER_SUBGROUP_ACCESS
)
}
let
(
:relaxed_group
)
{
create
(
:group
,
subgroup_creation_level:
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
}
let
(
:restricted_group
)
do
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
)
end
let
(
:owner
)
{
create
(
:user
)
}
let
(
:maintainer
)
{
create
(
:user
)
}
...
...
spec/policies/group_policy_spec.rb
View file @
f12636bf
...
...
@@ -99,9 +99,9 @@ describe GroupPolicy do
let
(
:current_user
)
{
maintainer
}
context
'with subgroup_creation level set to maintainer'
do
let
(
:group
)
{
create
(
:group
,
:private
,
subgroup_creation_level:
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
}
let
(
:group
)
do
create
(
:group
,
:private
,
subgroup_creation_level:
::
Gitlab
::
Access
::
MAINTAINER_SUBGROUP_ACCESS
)
end
it
'allows every maintainer permission plus creating subgroups'
do
allow
(
Group
).
to
receive
(
:supports_nested_objects?
).
and_return
(
true
)
...
...
@@ -207,10 +207,9 @@ describe GroupPolicy do
end
describe
'private nested group use the highest access level from the group and inherited permissions'
,
:nested_groups
do
let
(
:nested_group
)
{
create
(
:group
,
:private
,
:owner_subgroup_creation_only
,
parent:
group
)
}
let
(
:nested_group
)
do
create
(
:group
,
:private
,
:owner_subgroup_creation_only
,
parent:
group
)
end
before
do
nested_group
.
add_guest
(
guest
)
...
...
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