feat: add saml models

This commit is contained in:
Shivam Mishra
2025-08-25 13:08:12 +05:30
parent be721c2b50
commit 46f7390cbe
2 changed files with 28 additions and 0 deletions
@@ -0,0 +1,16 @@
class CreateAccountSamlSettings < ActiveRecord::Migration[7.1]
def change
create_table :account_saml_settings do |t|
t.references :account, null: false
t.boolean :enabled, default: false, null: false
t.string :sso_url
t.string :certificate_fingerprint
t.text :certificate
t.string :sp_entity_id
t.boolean :enforced_sso, default: false, null: false
t.json :attribute_mappings, default: {}
t.timestamps
end
end
end
@@ -0,0 +1,12 @@
class CreateSamlRoleMappings < ActiveRecord::Migration[7.1]
def change
create_table :saml_role_mappings do |t|
t.references :account_saml_settings, null: false
t.string :saml_group_name, null: false
t.integer :role, default: 0, null: false
t.references :custom_role, null: true
t.timestamps
end
end
end