diff options
author | ThibG <thib@sitedethib.com> | 2019-03-05 22:20:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 22:20:58 +0100 |
commit | 772b4ba24c60e0394d25d0fad4eefb338a9befea (patch) | |
tree | 804bb8ba01b1ff55471cc558d72456d2b9d0aea9 /app/policies/poll_policy.rb | |
parent | 2a4ce7458a16c64029842fde210089453be2ede1 (diff) | |
parent | 866496ac16b47ee17138db600519a630be833e4e (diff) |
Merge pull request #935 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/policies/poll_policy.rb')
-rw-r--r-- | app/policies/poll_policy.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/policies/poll_policy.rb b/app/policies/poll_policy.rb new file mode 100644 index 000000000..9d69eb5bb --- /dev/null +++ b/app/policies/poll_policy.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class PollPolicy < ApplicationPolicy + def vote? + StatusPolicy.new(current_account, record.status).show? && !current_account.blocking?(record.account) && !record.account.blocking?(current_account) + end +end |