about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-04-06 17:53:45 +0200
committerGitHub <noreply@github.com>2019-04-06 17:53:45 +0200
commite1d0390e29b60a6fa06d91a5d33dfb0e81fe7dd7 (patch)
treef9ac0846d75644ca5e49e8e26433a2c63c1b4f22 /config
parent2c63e0292a0a0a530ce814246bb6762983808135 (diff)
Add batch actions for approving and rejecting pending accounts (#10469)
Diffstat (limited to 'config')
-rw-r--r--config/locales/en.yml4
-rw-r--r--config/navigation.rb2
-rw-r--r--config/routes.rb7
3 files changed, 11 insertions, 2 deletions
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 705024ff5..df9c4913c 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -330,6 +330,8 @@ en:
         expired: Expired
         title: Filter
       title: Invites
+    pending_accounts:
+      title: Pending accounts (%{count})
     relays:
       add_new: Add new relay
       delete: Delete
@@ -496,7 +498,7 @@ en:
     salutation: "%{name},"
     settings: 'Change e-mail preferences: %{link}'
     view: 'View:'
-    view_profile: View Profile
+    view_profile: View profile
     view_status: View status
   applications:
     created: Application successfully created
diff --git a/config/navigation.rb b/config/navigation.rb
index a6b2b6e4c..dd5825867 100644
--- a/config/navigation.rb
+++ b/config/navigation.rb
@@ -28,7 +28,7 @@ SimpleNavigation::Configuration.run do |navigation|
     primary.item :moderation, safe_join([fa_icon('gavel fw'), t('moderation.title')]), admin_reports_url, if: proc { current_user.staff? } do |admin|
       admin.item :action_logs, safe_join([fa_icon('bars fw'), t('admin.action_logs.title')]), admin_action_logs_url
       admin.item :reports, safe_join([fa_icon('flag fw'), t('admin.reports.title')]), admin_reports_url, highlights_on: %r{/admin/reports}
-      admin.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_url, highlights_on: %r{/admin/accounts}
+      admin.item :accounts, safe_join([fa_icon('users fw'), t('admin.accounts.title')]), admin_accounts_url, highlights_on: %r{/admin/accounts|/admin/pending_accounts}
       admin.item :invites, safe_join([fa_icon('user-plus fw'), t('admin.invites.title')]), admin_invites_path
       admin.item :tags, safe_join([fa_icon('tag fw'), t('admin.tags.title')]), admin_tags_path
       admin.item :instances, safe_join([fa_icon('cloud fw'), t('admin.instances.title')]), admin_instances_url(limited: '1'), highlights_on: %r{/admin/instances|/admin/domain_blocks}, if: -> { current_user.admin? }
diff --git a/config/routes.rb b/config/routes.rb
index a98dbb700..1ea6490b0 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -214,6 +214,13 @@ Rails.application.routes.draw do
       end
     end
 
+    resources :pending_accounts, only: [:index, :update] do
+      collection do
+        post :approve_all
+        post :reject_all
+      end
+    end
+
     resources :users, only: [] do
       resource :two_factor_authentication, only: [:destroy]
     end