about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2020-01-12 23:56:43 -0600
committermultiple creatures <dev@multiple-creature.party>2020-01-12 23:56:43 -0600
commit51bab85b07b1433e832152f6498f203ec4b4434d (patch)
tree3c3e3a5cf92e03956195ef7a4e11f25e10f7b3ad /app/models
parent651c569c3fe7bd3ab12578396ec5934285f02188 (diff)
add privacy option to limit lifespan of public access to post & object urls beyond local followers, default to 90 days
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb1
-rw-r--r--app/models/user.rb5
2 files changed, 6 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index e43db63bd..59685a13b 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -133,6 +133,7 @@ class Account < ApplicationRecord
            :defaults_to_local_only?,
            :always_local_only?,
            :max_public_history,
+           :max_public_access,
            :roar_lifespan,
            :delayed_roars?,
 
diff --git a/app/models/user.rb b/app/models/user.rb
index 635025965..6c18898e9 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -146,6 +146,7 @@ class User < ApplicationRecord
     :hide_public_profile,
     :hide_public_outbox,
     :max_public_history,
+    :max_public_access,
     :roar_lifespan,
     :delayed_roars,
     :delayed_for,
@@ -331,6 +332,10 @@ class User < ApplicationRecord
     @_max_public_history ||= [1, (settings.max_public_history || 6).to_i].max
   end
 
+  def max_public_access
+    @_max_public_access ||= [1, (settings.max_public_access || 90).to_i].max
+  end
+
   def roar_lifespan
     @_roar_lifespan ||= [0, (settings.roar_lifespan || 0).to_i].max
   end