Service pages for Chat and Social #143

Merged
raucao merged 14 commits from feature/service_pages into master 2023-09-01 08:36:09 +00:00
2 changed files with 14 additions and 12 deletions
Showing only changes of commit f49aff262c - Show all commits

View File

@@ -0,0 +1,9 @@
class Services::BaseController < ApplicationController
before_action :set_current_section
private
def set_current_section
@current_section = :services
end
end

View File

@@ -1,8 +1,7 @@
class Services::RemotestorageController < ApplicationController
before_action :require_user_signed_in
before_action :require_service_enabled
class Services::RemotestorageController < Services::BaseController
before_action :authenticate_user!
before_action :require_feature_enabled
before_action :set_current_section
before_action :require_service_available
def dashboard
# unless current_user.services_enabled.include?(:remotestorage)
@@ -18,13 +17,7 @@ class Services::RemotestorageController < ApplicationController
end
end
def require_service_enabled
unless Setting.remotestorage_enabled?
http_status :not_found
end
end
def set_current_section
@current_section = :services
def require_service_available
http_status :not_found unless Setting.remotestorage_enabled?
end
end