Sha256: abf433def044c6b91d12620a2e9430ff9b466aba188712e556d399d8ace14d88

Contents?: true

Size: 340 Bytes

Versions: 20

Compression:

Stored size: 340 Bytes

Contents

module Authority
  class SecurityViolation < StandardError
    attr_reader :user, :action, :resource

    def initialize(user, action, resource)
      @user     = user
      @action   = action
      @resource = resource
    end

    def message
      "#{@user} is not authorized to #{@action} this resource: #{@resource}"
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
authority-3.3.0 lib/authority/security_violation.rb
authority-3.2.2 lib/authority/security_violation.rb
authority-3.2.1 lib/authority/security_violation.rb
authority-3.2.0 lib/authority/security_violation.rb
authority-3.1.0 lib/authority/security_violation.rb
authority-3.0.0 lib/authority/security_violation.rb
authority-2.10.0 lib/authority/security_violation.rb
authority-2.9.0 lib/authority/security_violation.rb
authority-2.8.1 lib/authority/security_violation.rb
authority-2.8.0 lib/authority/security_violation.rb
authority-2.7.0 lib/authority/security_violation.rb
authority-2.6.0 lib/authority/security_violation.rb
authority-2.5.0 lib/authority/security_violation.rb
authority-2.4.3 lib/authority/security_violation.rb
authority-2.4.2 lib/authority/security_violation.rb
authority-2.4.1 lib/authority/security_violation.rb
authority-2.4.0 lib/authority/security_violation.rb
authority-2.3.2 lib/authority/security_violation.rb
authority-2.3.1 lib/authority/security_violation.rb
authority-2.3.0 lib/authority/security_violation.rb