lib/scrivito/ui_config.rb in scrivito_sdk-1.2.0 vs lib/scrivito/ui_config.rb in scrivito_sdk-1.3.0.rc1
- old
+ new
@@ -8,10 +8,11 @@
def to_json
{
app_extension_tags: app_extension_tags,
editing_context: editing_context_config,
+ session: session_config,
i18n: i18n_config,
is_development_mode: Rails.env.development?,
resource_dialog: resource_dialog_config,
user: user_config,
user_permissions: user_permissions_config,
@@ -28,10 +29,14 @@
selected_workspace: workspace_config(selected_workspace),
visible_workspace: workspace_config(visible_workspace),
}
end
+ def session_config
+ Session.renew(SecureRandom.hex(8), editor)
+ end
+
def workspace_config(workspace)
{
id: workspace.id,
memberships: workspace.memberships.map do |membership|
{
@@ -39,9 +44,10 @@
role: membership.role,
description: membership.user.description
}
end,
outdated: workspace.outdated?,
+ auto_update: workspace.auto_update?,
title: workspace.title,
}
end
def i18n_config