Sha256: ff8469745bd09b1d234ad7aa3578d6ae382a041f66b35f5db2bc4aa040162aaa
Contents?: true
Size: 825 Bytes
Versions: 34
Compression:
Stored size: 825 Bytes
Contents
module Maestrano::Connector::Rails class User < ActiveRecord::Base # Enable Maestrano for this user maestrano_user_via :provider, :uid, :tenant do |user, maestrano| user.uid = maestrano.uid user.provider = maestrano.provider user.first_name = maestrano.first_name user.last_name = maestrano.last_name user.email = maestrano.email user.tenant = 'default' # To be set from SSO parameter end #=================================== # Associations #=================================== has_many :user_organization_rels has_many :organizations, through: :user_organization_rels #=================================== # Validation #=================================== validates :email, presence: true validates :tenant, presence: true end end
Version data entries
34 entries across 34 versions & 1 rubygems