diff options
author | Ryan Cobb <rcobb@gitlab.com> | 2019-08-27 03:23:59 +0300 |
---|---|---|
committer | Ryan Cobb <rcobb@gitlab.com> | 2019-08-27 03:23:59 +0300 |
commit | d1e6695a627a619ac1321db4086eff8feefc287e (patch) | |
tree | ddca1009759d564a11fc62f51cf21aea1f7aed0c | |
parent | 999b10cf02bfeb1558cdb1a2fb4b6e97cdbed8b4 (diff) |
Add method to authorize reading from prometheus proxy63044-move-cluster-metrics
-rw-r--r-- | app/controllers/clusters/base_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/clusters/base_controller.rb b/app/controllers/clusters/base_controller.rb index ef42f7c4074..188805c6106 100644 --- a/app/controllers/clusters/base_controller.rb +++ b/app/controllers/clusters/base_controller.rb @@ -31,6 +31,10 @@ class Clusters::BaseController < ApplicationController access_denied! unless can?(current_user, :create_cluster, clusterable) end + def authorize_read_prometheus! + access_denied! unless can?(current_user, :read_prometheus, clusterable) + end + def clusterable raise NotImplementedError end |