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
e8b984e6
Commit
e8b984e6
authored
Jul 12, 2019
by
Eugenia Grieff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use access levels instead of new conditions
parent
11c57abb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
app/policies/group_policy.rb
app/policies/group_policy.rb
+2
-0
ee/app/policies/epic_policy.rb
ee/app/policies/epic_policy.rb
+1
-4
No files found.
app/policies/group_policy.rb
View file @
e8b984e6
...
...
@@ -77,6 +77,7 @@ class GroupPolicy < BasePolicy
end
rule
{
maintainer
}.
policy
do
enable
:maintainer_access
enable
:create_projects
enable
:admin_pipeline
enable
:admin_build
...
...
@@ -88,6 +89,7 @@ class GroupPolicy < BasePolicy
end
rule
{
owner
}.
policy
do
enable
:owner_access
enable
:admin_group
enable
:admin_namespace
enable
:admin_group_member
...
...
ee/app/policies/epic_policy.rb
View file @
e8b984e6
...
...
@@ -3,9 +3,6 @@
class
EpicPolicy
<
BasePolicy
delegate
{
@subject
.
group
}
condition
(
:maintainer
)
{
@subject
.
group
.
has_maintainer?
(
@user
)
}
condition
(
:owner
)
{
@subject
.
group
.
has_owner?
(
@user
)
}
rule
{
can?
(
:read_epic
)
}.
policy
do
enable
:read_epic_iid
enable
:read_note
...
...
@@ -17,5 +14,5 @@ class EpicPolicy < BasePolicy
rule
{
can?
(
:create_note
)
}.
enable
:award_emoji
rule
{
maintainer
|
owner
}.
enable
:admin_note
rule
{
can?
(
:owner_access
)
|
can?
(
:maintainer_access
)
}.
enable
:admin_note
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