summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorhttp://jneen.net/ <jneen@jneen.net>2016-08-18 10:40:39 -0700
committerhttp://jneen.net/ <jneen@jneen.net>2016-08-30 11:39:22 -0700
commit2b26270ab7c489ebde4aac835f8e7307dc7a7441 (patch)
tree6022b217bd431194f54f4065eeb1aeb4779a75db /app/policies
parent06ba2602c59e5f6627d892ed9fdb2dafade5768b (diff)
downloadgitlab-ce-2b26270ab7c489ebde4aac835f8e7307dc7a7441.tar.gz
add Deployment, Environment, and ExternalIssue policies
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/deployment_policy.rb5
-rw-r--r--app/policies/environment_policy.rb5
-rw-r--r--app/policies/external_issue_policy.rb5
3 files changed, 15 insertions, 0 deletions
diff --git a/app/policies/deployment_policy.rb b/app/policies/deployment_policy.rb
new file mode 100644
index 00000000000..163d070ff90
--- /dev/null
+++ b/app/policies/deployment_policy.rb
@@ -0,0 +1,5 @@
+class DeploymentPolicy < BasePolicy
+ def rules
+ delegate! @subject.project
+ end
+end
diff --git a/app/policies/environment_policy.rb b/app/policies/environment_policy.rb
new file mode 100644
index 00000000000..f4219569161
--- /dev/null
+++ b/app/policies/environment_policy.rb
@@ -0,0 +1,5 @@
+class EnvironmentPolicy < BasePolicy
+ def rules
+ delegate! @subject.project
+ end
+end
diff --git a/app/policies/external_issue_policy.rb b/app/policies/external_issue_policy.rb
new file mode 100644
index 00000000000..d9e28bd107a
--- /dev/null
+++ b/app/policies/external_issue_policy.rb
@@ -0,0 +1,5 @@
+class ExternalIssuePolicy < BasePolicy
+ def rules
+ delegate! @subject.project
+ end
+end