Sha256: 5b47570c586972413a4a55c6b5456a2d6f808a356458fceb8aca6f413914f5d7

Contents?: true

Size: 517 Bytes

Versions: 9

Compression:

Stored size: 517 Bytes

Contents

module Kadmin
  module Auth
    class User
      attr_accessor :email, :accept, :organization

      def initialize(email, options = {})
        @email = email
        @admin = options[:admin]
        @organization = options[:organization]
        @accept = options[:accept]
      end

      def organization=(organization)
        @organization = organization if self.admin?
      end

      def authorized?(_request)
        return true
      end

      def admin?
        return @admin
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
kadmin-1.3.0 lib/kadmin/auth/user.rb
kadmin-1.2.1 lib/kadmin/auth/user.rb
kadmin-1.2.0 lib/kadmin/auth/user.rb
kadmin-1.1.1 lib/kadmin/auth/user.rb
kadmin-1.1.0 lib/kadmin/auth/user.rb
kadmin-1.0.9 lib/kadmin/auth/user.rb
kadmin-1.0.8 lib/kadmin/auth/user.rb
kadmin-1.0.7 lib/kadmin/auth/user.rb
kadmin-1.0.6 lib/kadmin/auth/user.rb