Commit 00bcd358 authored by Kamil Trzciński's avatar 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
parents 093858ad 935ecf5c
...@@ -31,6 +31,10 @@ class Clusters::BaseController < ApplicationController ...@@ -31,6 +31,10 @@ class Clusters::BaseController < ApplicationController
access_denied! unless can?(current_user, :create_cluster, clusterable) access_denied! unless can?(current_user, :create_cluster, clusterable)
end end
def authorize_read_prometheus!
access_denied! unless can?(current_user, :read_prometheus, clusterable)
end
def clusterable def clusterable
raise NotImplementedError raise NotImplementedError
end end
......
...@@ -8,6 +8,7 @@ module Clusters ...@@ -8,6 +8,7 @@ module Clusters
enable :create_cluster enable :create_cluster
enable :update_cluster enable :update_cluster
enable :admin_cluster enable :admin_cluster
enable :read_prometheus
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment