diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-07-27 07:45:50 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:16 -0500 |
commit | 22326c3c028ff9e542ba4cbc8422076c420287fc (patch) | |
tree | 0a80a481b7f4be48e0c75ed174b7dbd47a9ce262 /app/models/account.rb | |
parent | ba45644591b7626e2acffd6f21de6988456a008b (diff) |
[Privacy] Improve handling of mixed permissions
Diffstat (limited to 'app/models/account.rb')
-rw-r--r-- | app/models/account.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb index 301dc6c45..f7de58776 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -383,6 +383,14 @@ class Account < ApplicationRecord end end + def public_domain_permissions? + domain_permissions.where(visibility: [:public, :unlisted]).exists? + end + + def private_domain_permissions? + domain_permissions.where(visibility: [:private, :direct, :limited]).exists? + end + class Field < ActiveModelSerializers::Model attributes :name, :value, :verified_at, :account, :errors |