akkounts/app/controllers/services/remotestorage_controller.rb
Râu Cao f49aff262c
Some checks are pending
continuous-integration/drone/push Build is running
Add base controller for service controllers
2023-08-07 18:15:17 +02:00

24 lines
607 B
Ruby

class Services::RemotestorageController < Services::BaseController
before_action :authenticate_user!
before_action :require_feature_enabled
before_action :require_service_available
def dashboard
# unless current_user.services_enabled.include?(:remotestorage)
# redirect_to service_remotestorage_info_path
# end
end
private
def require_feature_enabled
unless Flipper.enabled?(:remotestorage, current_user)
http_status :forbidden
end
end
def require_service_available
http_status :not_found unless Setting.remotestorage_enabled?
end
end