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:
16
db/migrate/20251030140000_add_ui_layout_to_users.rb
Normal file
16
db/migrate/20251030140000_add_ui_layout_to_users.rb
Normal file
@@ -0,0 +1,16 @@
|
||||
class AddUiLayoutToUsers < ActiveRecord::Migration[7.2]
|
||||
class MigrationUser < ApplicationRecord
|
||||
self.table_name = "users"
|
||||
end
|
||||
|
||||
def up
|
||||
add_column :users, :ui_layout, :string, if_not_exists: true
|
||||
|
||||
MigrationUser.reset_column_information
|
||||
MigrationUser.where(ui_layout: [ nil, "" ]).update_all(ui_layout: "dashboard")
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :users, :ui_layout
|
||||
end
|
||||
end
|
||||
5
db/schema.rb
generated
5
db/schema.rb
generated
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[7.2].define(version: 2026_02_07_231945) do
|
||||
ActiveRecord::Schema[7.2].define(version: 2026_02_08_110000) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pgcrypto"
|
||||
enable_extension "plpgsql"
|
||||
@@ -25,7 +25,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_02_07_231945) do
|
||||
t.uuid "provider_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["account_id", "provider_type"], name: "index_account_providers_on_account_and_provider_type", unique: true
|
||||
t.index ["account_id", "provider_type"], name: "index_account_providers_on_account_id_and_provider_type", unique: true
|
||||
t.index ["provider_type", "provider_id"], name: "index_account_providers_on_provider_type_and_provider_id", unique: true
|
||||
end
|
||||
|
||||
@@ -1457,6 +1457,7 @@ ActiveRecord::Schema[7.2].define(version: 2026_02_07_231945) do
|
||||
t.datetime "set_onboarding_preferences_at"
|
||||
t.datetime "set_onboarding_goals_at"
|
||||
t.string "default_account_order", default: "name_asc"
|
||||
t.string "ui_layout"
|
||||
t.jsonb "preferences", default: {}, null: false
|
||||
t.string "locale"
|
||||
t.index ["email"], name: "index_users_on_email", unique: true
|
||||
|
||||
Reference in New Issue
Block a user