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

Version Path
maestrano-connector-rails-2.0.2.pre.RC8 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC9 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC7 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC6 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC5 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC4 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC3 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC2 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.2.pre.RC1 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.1 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC13 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC12 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC11 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC10 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC9 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC8 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-1.5.0 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC7 app/models/maestrano/connector/rails/user.rb
maestrano-connector-rails-2.0.0.pre.RC6 app/models/maestrano/connector/rails/user.rb