Sha256: 9fe7de90d85fd1a835db6bcbf9cfeb5e8559216fcdf197a3417996b57261fba0

Contents?: true

Size: 562 Bytes

Versions: 20

Compression:

Stored size: 562 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?
      end

      def to_s
        @user_name
      end

      attr_reader :user_name, :groups, :language

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

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
infopark_reactor-1.23.1 lib/reactor/session/user.rb
infopark_reactor-1.23.0 lib/reactor/session/user.rb
infopark_reactor-1.23.0.beta2 lib/reactor/session/user.rb
infopark_reactor-1.22.6 lib/reactor/session/user.rb
infopark_reactor-1.22.5 lib/reactor/session/user.rb
infopark_reactor-1.22.4 lib/reactor/session/user.rb
infopark_reactor-1.22.3 lib/reactor/session/user.rb
infopark_reactor-1.22.2 lib/reactor/session/user.rb
infopark_reactor-1.22.1 lib/reactor/session/user.rb
infopark_reactor-1.22.0 lib/reactor/session/user.rb
infopark_reactor-1.21.0 lib/reactor/session/user.rb
infopark_reactor-1.20.4 lib/reactor/session/user.rb
infopark_reactor-1.20.3 lib/reactor/session/user.rb
infopark_reactor-1.20.2 lib/reactor/session/user.rb
infopark_reactor-1.20.1 lib/reactor/session/user.rb
infopark_reactor-1.20.0 lib/reactor/session/user.rb
infopark_reactor-1.19.0 lib/reactor/session/user.rb
infopark_reactor-1.18.0 lib/reactor/session/user.rb
infopark_reactor-1.17.0 lib/reactor/session/user.rb
infopark_reactor-1.16.0 lib/reactor/session/user.rb