mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 20:14:08 +00:00
First cut of a simplified "intro" UI layout (#265)
* First cut of a simplified "intro" UI layout * Linter * Add guest role and intro-only access * Fix guest role UI defaults (#940) Use enum predicate to avoid missing role helper. * Remove legacy user role mapping (#941) Drop the unused user role references in role normalization and SSO role mapping forms to avoid implying a role that never existed. Refs: #0 * Remove role normalization (#942) Remove role normalization Roles are now stored directly without legacy mappings. * Revert role mapping logic * Remove `normalize_role_settings` * Remove unnecessary migration * Make `member` the default * Broken `.erb` --------- Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
This commit is contained in:
@@ -42,6 +42,9 @@ module Sure
|
||||
# Enable Rack::Attack middleware for API rate limiting
|
||||
config.middleware.use Rack::Attack
|
||||
|
||||
config.x.ui = ActiveSupport::OrderedOptions.new
|
||||
default_layout = ENV.fetch("DEFAULT_UI_LAYOUT", "dashboard")
|
||||
config.x.ui.default_layout = default_layout.in?(%w[dashboard intro]) ? default_layout : "dashboard"
|
||||
# Handle OmniAuth/OIDC errors gracefully (must be before OmniAuth middleware)
|
||||
require_relative "../app/middleware/omniauth_error_handler"
|
||||
config.middleware.use OmniauthErrorHandler
|
||||
|
||||
Reference in New Issue
Block a user