Sha256: 4e51b815464418bdb976628e5c391d1e0d0a174bc5c640b45f73eeec3e84f612

Contents?: true

Size: 601 Bytes

Versions: 7

Compression:

Stored size: 601 Bytes

Contents

# -*- encoding : utf-8 -*-
require 'reactor/cm/user'

module Reactor
  class Session
    class User
      def initialize(user_name)
        # Rails.logger.debug "Reading user #{user_name} from CM"
        user      = Reactor::Cm::User.new(user_name)
        @user_name= user_name
        @groups   = user.groups
        @language = user.language
        @superuser= user.is_root?
        @email    = user.email
      end

      def to_s
        @user_name
      end

      attr_reader :user_name, :groups, :language, :email

      def superuser?
        @superuser == true
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
infopark_reactor-1.26.1 lib/reactor/session/user.rb
infopark_reactor-1.26.0 lib/reactor/session/user.rb
infopark_reactor-1.25.2 lib/reactor/session/user.rb
infopark_reactor-1.25.1 lib/reactor/session/user.rb
infopark_reactor-1.25.0 lib/reactor/session/user.rb
infopark_reactor-1.24.1 lib/reactor/session/user.rb
infopark_reactor-1.24.0 lib/reactor/session/user.rb