Commit 935ecf5c authored by Ryan Cobb's avatar Ryan Cobb Committed by Kamil Trzciński

Add method to authorize reading from prometheus proxy

parent 093858ad
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment