diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-19 18:50:24 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:43:59 -0500 |
commit | 21438b54bdaf3c557ec9ebbc482a2c418d8c64f8 (patch) | |
tree | e577d047af196823227e675dea52b2fc2fa842c6 /app/policies | |
parent | 8c8ad0ac0ed0d3e67f3e521068b59edd4054f1e9 (diff) |
[Feature] Add manual publishing option
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/status_policy.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/policies/status_policy.rb b/app/policies/status_policy.rb index fa5c0dd9c..9c98b0688 100644 --- a/app/policies/status_policy.rb +++ b/app/policies/status_policy.rb @@ -13,6 +13,7 @@ class StatusPolicy < ApplicationPolicy def show? return false if local_only? && (current_account.nil? || !current_account.local?) + return false unless published? || owned? if requires_mention? owned? || mention_exists? @@ -96,4 +97,8 @@ class StatusPolicy < ApplicationPolicy def local_only? record.local_only? end + + def published? + record.published? + end end |