about summary refs log tree commit diff
path: root/app/policies
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2020-11-07 18:19:34 +0100
committerThibaut Girka <thib@sitedethib.com>2020-11-07 18:23:02 +0100
commit412218af2ecd4cd004708d781e574208742dea4c (patch)
treec0bf823109c7481ec9242a0263e091ec4aaeafeb /app/policies
parent5a9fc749c3eab8d3c93dd282fa89c20a5cb0e994 (diff)
parentee8cf246cfe8e05914ad7dcf81596f8535b3e161 (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/account_policy.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/policies/account_policy.rb b/app/policies/account_policy.rb
index 1b105e92a..679119075 100644
--- a/app/policies/account_policy.rb
+++ b/app/policies/account_policy.rb
@@ -25,6 +25,14 @@ class AccountPolicy < ApplicationPolicy
     staff?
   end
 
+  def sensitive?
+    staff? && !record.user&.staff?
+  end
+
+  def unsensitive?
+    staff?
+  end
+
   def silence?
     staff? && !record.user&.staff?
   end