about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/announcement_policy.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/policies/announcement_policy.rb b/app/policies/announcement_policy.rb
new file mode 100644
index 000000000..0a4e4575c
--- /dev/null
+++ b/app/policies/announcement_policy.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class AnnouncementPolicy < ApplicationPolicy
+  def index?
+    staff?
+  end
+
+  def create?
+    admin?
+  end
+
+  def update?
+    admin?
+  end
+
+  def destroy?
+    admin?
+  end
+end