30
app/controllers/services/remotestorage_controller.rb
Normal file
30
app/controllers/services/remotestorage_controller.rb
Normal file
@@ -0,0 +1,30 @@
|
||||
class Services::RemotestorageController < ApplicationController
|
||||
before_action :require_user_signed_in
|
||||
before_action :require_service_enabled
|
||||
before_action :require_feature_enabled
|
||||
before_action :set_current_section
|
||||
|
||||
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_enabled
|
||||
unless Setting.remotestorage_enabled?
|
||||
http_status :not_found
|
||||
end
|
||||
end
|
||||
|
||||
def set_current_section
|
||||
@current_section = :services
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user