summaryrefslogtreecommitdiff
path: root/app/policies/clusters/agent_policy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies/clusters/agent_policy.rb')
-rw-r--r--app/policies/clusters/agent_policy.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/policies/clusters/agent_policy.rb b/app/policies/clusters/agent_policy.rb
new file mode 100644
index 00000000000..25e78c84802
--- /dev/null
+++ b/app/policies/clusters/agent_policy.rb
@@ -0,0 +1,9 @@
+# frozen_string_literal: true
+
+module Clusters
+ class AgentPolicy < BasePolicy
+ alias_method :cluster_agent, :subject
+
+ delegate { cluster_agent.project }
+ end
+end