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
8d9150b6
Commit
8d9150b6
authored
Apr 13, 2020
by
Hordur Freyr Yngvason
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge error conditions into one
parent
bb87444a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
app/services/clusters/management/validate_permissions_service.rb
...vices/clusters/management/validate_permissions_service.rb
+1
-8
No files found.
app/services/clusters/management/validate_permissions_service.rb
View file @
8d9150b6
...
...
@@ -13,14 +13,7 @@ module Clusters
if
management_project_id
.
present?
management_project
=
management_project_scope
(
cluster
).
find_by_id
(
management_project_id
)
unless
management_project
cluster
.
errors
.
add
(
:management_project_id
,
_
(
'Project does not exist or you don\'t have permission to perform this action'
))
return
false
end
unless
can_admin_pipeline_for_project?
(
management_project
)
# Use same message as not found to prevent enumeration
unless
management_project
&&
can_admin_pipeline_for_project?
(
management_project
)
cluster
.
errors
.
add
(
:management_project_id
,
_
(
'Project does not exist or you don\'t have permission to perform this action'
))
return
false
...
...
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