diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-12-15 10:38:54 +0100 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-12-15 10:45:53 +0100 |
commit | 65e994b29b7c3b06dc61ab5eed35b571ebafdf94 (patch) | |
tree | 4cb922f9abb201278312210d678f43ab976b6aea /app/controllers/admin | |
parent | f0505a5b2e727da73c8aa651b804508a8187a3c4 (diff) | |
parent | 67b924e324220885b46d9e26c8beb6ee8d3cf8bf (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - app/controllers/directories_controller.rb - app/controllers/settings/applications_controller.rb - app/controllers/settings/base_controller.rb - app/controllers/settings/deletes_controller.rb - app/controllers/settings/exports_controller.rb - app/controllers/settings/follower_domains_controller.rb - app/controllers/settings/imports_controller.rb - app/controllers/settings/migrations_controller.rb - app/controllers/settings/notifications_controller.rb - app/controllers/settings/preferences_controller.rb - app/controllers/settings/sessions_controller.rb - app/controllers/settings/two_factor_authentication/confirmations_controller.rb - app/controllers/settings/two_factor_authentication/recovery_codes_controller.rb - app/controllers/settings/two_factor_authentications_controller.rb Conflicts were due to some refactoring already made in glitch-soc when introducing flavours.
Diffstat (limited to 'app/controllers/admin')
-rw-r--r-- | app/controllers/admin/accounts_controller.rb | 13 | ||||
-rw-r--r-- | app/controllers/admin/dashboard_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/admin/settings_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/admin/tags_controller.rb | 2 |
4 files changed, 16 insertions, 2 deletions
diff --git a/app/controllers/admin/accounts_controller.rb b/app/controllers/admin/accounts_controller.rb index f155543ce..771302db8 100644 --- a/app/controllers/admin/accounts_controller.rb +++ b/app/controllers/admin/accounts_controller.rb @@ -2,7 +2,7 @@ module Admin class AccountsController < BaseController - before_action :set_account, only: [:show, :subscribe, :unsubscribe, :redownload, :remove_avatar, :enable, :disable, :memorialize] + before_action :set_account, only: [:show, :subscribe, :unsubscribe, :redownload, :remove_avatar, :remove_header, :enable, :disable, :memorialize] before_action :require_remote_account!, only: [:subscribe, :unsubscribe, :redownload] before_action :require_local_account!, only: [:enable, :disable, :memorialize] @@ -71,6 +71,17 @@ module Admin redirect_to admin_account_path(@account.id) end + def remove_header + authorize @account, :remove_header? + + @account.header = nil + @account.save! + + log_action :remove_header, @account.user + + redirect_to admin_account_path(@account.id) + end + private def set_account diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index 7be753c9b..bb923c185 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -28,6 +28,7 @@ module Admin @pam_enabled = ENV['PAM_ENABLED'] == 'true' @hidden_service = ENV['ALLOW_ACCESS_TO_HIDDEN_SERVICE'] == 'true' @trending_hashtags = TrendingTags.get(7) + @profile_directory = Setting.profile_directory end private diff --git a/app/controllers/admin/settings_controller.rb b/app/controllers/admin/settings_controller.rb index fe2720c48..76b3c3a2b 100644 --- a/app/controllers/admin/settings_controller.rb +++ b/app/controllers/admin/settings_controller.rb @@ -28,6 +28,7 @@ module Admin show_known_fediverse_at_about_page preview_sensitive_media custom_css + profile_directory ).freeze BOOLEAN_SETTINGS = %w( @@ -39,6 +40,7 @@ module Admin peers_api_enabled show_known_fediverse_at_about_page preview_sensitive_media + profile_directory ).freeze UPLOAD_SETTINGS = %w( diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb index 3f2256566..e9f4f2cfa 100644 --- a/app/controllers/admin/tags_controller.rb +++ b/app/controllers/admin/tags_controller.rb @@ -18,7 +18,7 @@ module Admin def unhide authorize @tag, :unhide? - @tag.account_tag_stat.update!(hidden: true) + @tag.account_tag_stat.update!(hidden: false) redirect_to admin_tags_path(@filter_params) end |