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
a24eabb1
Commit
a24eabb1
authored
Mar 05, 2019
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve conflicts in group policy
parent
ad2f711a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
app/policies/group_policy.rb
app/policies/group_policy.rb
+0
-1
spec/policies/group_policy_spec.rb
spec/policies/group_policy_spec.rb
+2
-2
No files found.
app/policies/group_policy.rb
View file @
a24eabb1
...
...
@@ -53,7 +53,6 @@ class GroupPolicy < BasePolicy
rule
{
admin
}.
enable
:read_group
rule
{
has_projects
}.
policy
do
enable
:read_group
enable
:read_list
enable
:read_label
end
...
...
spec/policies/group_policy_spec.rb
View file @
a24eabb1
...
...
@@ -114,13 +114,13 @@ describe GroupPolicy do
project
.
add_developer
(
current_user
)
end
it
{
expect_allowed
(
:read_label
)
}
it
{
expect_allowed
(
:read_label
,
:read_list
)
}
context
'in subgroups'
,
:nested_groups
do
let
(
:subgroup
)
{
create
(
:group
,
:private
,
parent:
group
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
subgroup
)
}
it
{
expect_allowed
(
:read_label
)
}
it
{
expect_allowed
(
:read_label
,
:read_list
)
}
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