docbrown/app/controllers/admin/settings_controller.rb
Nick Taylor 6df9309284
Added the logo upload to the admin -> customization -> config -> images section. (#15729)
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <mac@forem.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
2021-12-15 14:10:27 -05:00

25 lines
885 B
Ruby

module Admin
# This controller is solely responsible for rendering the settings page at
# /admin/customization/config. The actual updates get handled by the settings
# controllers in the Admin::Settings namespace.
class SettingsController < Admin::ApplicationController
# NOTE: The "show" action uses a lot of partials, this makes it easier to
# reference them.
prepend_view_path("app/views/admin/settings")
layout "admin"
def show
@logo_allowed_types = LogoUploader::ALLOWED_TYPES
@logo_max_file_size = LogoUploader::MAX_FILE_SIZE
@confirmation_text =
"My username is @#{current_user.username} and this action is 100% safe and appropriate."
end
private
# We need to override this method from Admin::ApplicationController since
# there is no resource to authorize.
def authorization_resource; end
end
end