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
8116e400
Commit
8116e400
authored
Feb 07, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't skip authorization when stopping CI environments
parent
9d7c5e75
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
8 deletions
+4
-8
app/finders/environments_finder.rb
app/finders/environments_finder.rb
+3
-7
app/services/ci/stop_environments_service.rb
app/services/ci/stop_environments_service.rb
+1
-1
No files found.
app/finders/environments_finder.rb
View file @
8116e400
...
...
@@ -5,7 +5,7 @@ class EnvironmentsFinder
@project
,
@current_user
,
@params
=
project
,
current_user
,
params
end
def
execute
(
skip_authorization:
false
)
def
execute
deployments
=
project
.
deployments
deployments
=
if
ref
...
...
@@ -36,13 +36,9 @@ class EnvironmentsFinder
end
end
unless
skip_authorization
environments
.
select!
do
|
environment
|
Ability
.
allowed?
(
current_user
,
:read_environment
,
environment
)
end
environments
.
select
do
|
environment
|
Ability
.
allowed?
(
current_user
,
:read_environment
,
environment
)
end
environments
end
private
...
...
app/services/ci/stop_environments_service.rb
View file @
8116e400
...
...
@@ -23,7 +23,7 @@ module Ci
def
environments
@environments
||=
EnvironmentsFinder
.
new
(
project
,
nil
,
ref:
@ref
,
recently_updated:
true
).
execute
(
skip_authorization:
true
)
EnvironmentsFinder
.
new
(
project
,
current_user
,
ref:
@ref
,
recently_updated:
true
).
execute
end
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