lib/fiona7/engine.rb in infopark_fiona7-1.2.0.2.3 vs lib/fiona7/engine.rb in infopark_fiona7-1.5.2.0.0
- old
+ new
@@ -155,34 +155,31 @@
if Fiona7.login = !config.root_mode
Scrivito.configure do |config|
config.editing_auth do |env|
request = ActionDispatch::Request.new(env)
session = request.session
- rsession = Reactor::SessionHelper::RsessionHelper.from_session(session)
+ rsession = session[:rsession]
if rsession && rsession.user?
Fiona7::ScrivitoUser.define(rsession.user)
end
end
config.find_user do |user_id|
- begin
- user = Reactor::Cache::User.instance.get(user_id)
- Fiona7::ScrivitoUser.define(user)
- rescue Reactor::Cm::XmlSingleRequestError => e
- # this is the error code for entry (possibly user) not found
- # other errors we want to pass on (unauthorized, etc)
- raise e unless e.message =~ /060001/
- end
+ user = Reactor::Cache::User.instance.get(user_id)
+
+ Fiona7::ScrivitoUser.define(user)
end
end
end
if config.mode == :standalone
RailsConnector::Configuration.mode = :editor
end
RailsConnector::Configuration.instance_name = config.instance
+
+ Scrivito::Configuration.tenant = config.instance
end
end
class Engine < ::Rails::Engine
@@ -240,10 +237,10 @@
# and if we don't find any, we destroy rsession. Why?
# Calling rsession.destroy first constructs the session
# for the current user (root most likely), which is not
# really a thing that we want - being root by default
# should only happen in the root mode
- if !rsession.user?
+ if !session[:rsession]
rsession.destroy
end
end
end
end