about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/about_controller.rb2
-rw-r--r--app/controllers/admin/domain_allows_controller.rb2
-rw-r--r--app/models/domain_allow.rb1
-rw-r--r--app/models/status.rb1
-rw-r--r--app/views/admin/domain_allows/new.html.haml1
5 files changed, 4 insertions, 3 deletions
diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb
index 218dcb99e..1f8f9ff58 100644
--- a/app/controllers/about_controller.rb
+++ b/app/controllers/about_controller.rb
@@ -21,7 +21,7 @@ class AboutController < ApplicationController
     @contents          = toc_generator.html
     @table_of_contents = toc_generator.toc
     @blocks            = DomainBlock.with_user_facing_limitations.by_severity if display_blocks?
-    @allows            = DomainAllow.all if display_allows?
+    @allows            = DomainAllow.where(hidden: false) if display_allows?
   end
 
   def terms; end
diff --git a/app/controllers/admin/domain_allows_controller.rb b/app/controllers/admin/domain_allows_controller.rb
index 31be1978b..95d9a31fb 100644
--- a/app/controllers/admin/domain_allows_controller.rb
+++ b/app/controllers/admin/domain_allows_controller.rb
@@ -35,6 +35,6 @@ class Admin::DomainAllowsController < Admin::BaseController
   end
 
   def resource_params
-    params.require(:domain_allow).permit(:domain)
+    params.require(:domain_allow).permit(:domain, :hidden)
   end
 end
diff --git a/app/models/domain_allow.rb b/app/models/domain_allow.rb
index 5fe0e3a29..734284e59 100644
--- a/app/models/domain_allow.rb
+++ b/app/models/domain_allow.rb
@@ -8,6 +8,7 @@
 #  domain     :string           default(""), not null
 #  created_at :datetime         not null
 #  updated_at :datetime         not null
+#  hidden     :boolean          default(FALSE)
 #
 
 class DomainAllow < ApplicationRecord
diff --git a/app/models/status.rb b/app/models/status.rb
index 594ae98c0..e4d94186e 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -22,7 +22,6 @@
 #  application_id         :bigint(8)
 #  in_reply_to_account_id :bigint(8)
 #  local_only             :boolean
-#  full_status_text       :text             default(""), not null
 #  poll_id                :bigint(8)
 #  content_type           :string
 #  deleted_at             :datetime
diff --git a/app/views/admin/domain_allows/new.html.haml b/app/views/admin/domain_allows/new.html.haml
index 85ab7e464..0540765d7 100644
--- a/app/views/admin/domain_allows/new.html.haml
+++ b/app/views/admin/domain_allows/new.html.haml
@@ -6,6 +6,7 @@
 
   .fields-group
     = f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), required: true
+    = f.input :hidden, wrapper: :with_label, label: t('admin.domain_allows.hidden')
 
   .actions
     = f.button :button, t('admin.domain_allows.add_new'), type: :submit