提交 00bcd358 编写于 作者: K Kamil Trzciński

Merge branch '63044-add-prom-proxies-ce' into 'master'

Add method to authorize reading from prometheus proxy

Closes #63044

See merge request gitlab-org/gitlab-ce!32305
......@@ -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
......
......@@ -8,6 +8,7 @@ module Clusters
enable :create_cluster
enable :update_cluster
enable :admin_cluster
enable :read_prometheus
end
end
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册