Sha256: 17e81abceeba556db1152e34c54274aa09d83c3809a7610305a4bfe6a6191e46

Contents?: true

Size: 343 Bytes

Versions: 56

Compression:

Stored size: 343 Bytes

Contents

module Kadmin
  module Errors
    class Authorization < Kadmin::Error
      attr_reader :resource, :user, :reason

      def initialize(resource, user, reason)
        @resource = resource
        @user = user
        @reason = reason

        super("#{@user} is unauthorized to access #{@resource} => #{@reason}")
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
kadmin-1.3.0 lib/kadmin/errors/authorization.rb
kadmin-1.2.1 lib/kadmin/errors/authorization.rb
kadmin-1.2.0 lib/kadmin/errors/authorization.rb
kadmin-1.1.1 lib/kadmin/errors/authorization.rb
kadmin-1.1.0 lib/kadmin/errors/authorization.rb
kadmin-1.0.9 lib/kadmin/errors/authorization.rb
kadmin-1.0.8 lib/kadmin/errors/authorization.rb
kadmin-1.0.7 lib/kadmin/errors/authorization.rb
kadmin-1.0.6 lib/kadmin/errors/authorization.rb
kadmin-1.0.5 lib/kadmin/errors/authorization.rb
kadmin-1.0.4 lib/kadmin/errors/authorization.rb
kadmin-1.0.3 lib/kadmin/errors/authorization.rb
kadmin-1.0.2 lib/kadmin/errors/authorization.rb
kadmin-1.0.1 lib/kadmin/errors/authorization.rb
kadmin-1.0.0 lib/kadmin/errors/authorization.rb
kadmin-0.9.5 lib/kadmin/errors/authorization.rb
kadmin-0.9.4 lib/kadmin/errors/authorization.rb
kadmin-0.8.0 lib/kadmin/errors/authorization.rb
kadmin-0.7.5 lib/kadmin/errors/authorization.rb
kadmin-0.7.4 lib/kadmin/errors/authorization.rb