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
18fd2ccb
Commit
18fd2ccb
authored
Jun 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve cyclomatic of ability::allowed
parent
00526440
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
app/models/ability.rb
app/models/ability.rb
+1
-15
No files found.
app/models/ability.rb
View file @
18fd2ccb
...
@@ -9,7 +9,6 @@ class Ability
...
@@ -9,7 +9,6 @@ class Ability
when
CommitStatus
then
commit_status_abilities
(
user
,
subject
)
when
CommitStatus
then
commit_status_abilities
(
user
,
subject
)
when
Project
then
project_abilities
(
user
,
subject
)
when
Project
then
project_abilities
(
user
,
subject
)
when
Issue
then
issue_abilities
(
user
,
subject
)
when
Issue
then
issue_abilities
(
user
,
subject
)
when
ExternalIssue
then
external_issue_abilities
(
user
,
subject
)
when
Note
then
note_abilities
(
user
,
subject
)
when
Note
then
note_abilities
(
user
,
subject
)
when
ProjectSnippet
then
project_snippet_abilities
(
user
,
subject
)
when
ProjectSnippet
then
project_snippet_abilities
(
user
,
subject
)
when
PersonalSnippet
then
personal_snippet_abilities
(
user
,
subject
)
when
PersonalSnippet
then
personal_snippet_abilities
(
user
,
subject
)
...
@@ -18,9 +17,8 @@ class Ability
...
@@ -18,9 +17,8 @@ class Ability
when
Namespace
then
namespace_abilities
(
user
,
subject
)
when
Namespace
then
namespace_abilities
(
user
,
subject
)
when
GroupMember
then
group_member_abilities
(
user
,
subject
)
when
GroupMember
then
group_member_abilities
(
user
,
subject
)
when
ProjectMember
then
project_member_abilities
(
user
,
subject
)
when
ProjectMember
then
project_member_abilities
(
user
,
subject
)
when
Deployment
then
deployment_abilities
(
user
,
subject
)
when
Environment
then
environment_abilities
(
user
,
subject
)
when
User
then
user_abilities
when
User
then
user_abilities
when
ExternalIssue
,
Deployment
,
Environment
then
project_abilities
(
user
,
subject
.
project
)
else
[]
else
[]
end
.
concat
(
global_abilities
(
user
))
end
.
concat
(
global_abilities
(
user
))
end
end
...
@@ -523,18 +521,6 @@ class Ability
...
@@ -523,18 +521,6 @@ class Ability
end
end
end
end
def
external_issue_abilities
(
user
,
subject
)
project_abilities
(
user
,
subject
.
project
)
end
def
deployment_abilities
(
user
,
subject
)
project_abilities
(
user
,
subject
.
project
)
end
def
environment_abilities
(
user
,
subject
)
project_abilities
(
user
,
subject
.
project
)
end
private
private
def
restricted_public_level?
def
restricted_public_level?
...
...
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