summaryrefslogtreecommitdiff
path: root/app/services/metrics
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-22 09:08:39 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-22 09:08:39 +0000
commit001243986195143c395a9811d8254bbf1b9ebfa1 (patch)
tree6d6d665154fd38beea6ea7f8985330f956565bb3 /app/services/metrics
parent83d8c1d61762898eb4e69878f117cbb2ef5be494 (diff)
downloadgitlab-ce-001243986195143c395a9811d8254bbf1b9ebfa1.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/metrics')
-rw-r--r--app/services/metrics/dashboard/base_service.rb10
1 files changed, 3 insertions, 7 deletions
diff --git a/app/services/metrics/dashboard/base_service.rb b/app/services/metrics/dashboard/base_service.rb
index c51c88d776a..40c015dff9c 100644
--- a/app/services/metrics/dashboard/base_service.rb
+++ b/app/services/metrics/dashboard/base_service.rb
@@ -38,13 +38,9 @@ module Metrics
# Determines whether users should be able to view
# dashboards at all.
def allowed?
- if params[:environment]
- Ability.allowed?(current_user, :read_environment, project)
- elsif params[:cluster]
- true # Authorization handled at controller level
- else
- false
- end
+ return false unless params[:environment]
+
+ Ability.allowed?(current_user, :read_environment, project)
end
# Returns a new dashboard Hash, supplemented with DB info