Skip to content
Snippets Groups Projects
Commit 935ecf5c authored by Ryan Cobb's avatar Ryan Cobb Committed by Kamil Trzciński
Browse files

Add method to authorize reading from prometheus proxy

parent 093858ad
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -8,6 +8,7 @@ module Clusters
enable :create_cluster
enable :update_cluster
enable :admin_cluster
enable :read_prometheus
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment