Sha256: 63b9727fcc03ccc9669868531989bbd822fe23788173de580e93cdf9d89a3e39

Contents?: true

Size: 362 Bytes

Versions: 13

Compression:

Stored size: 362 Bytes

Contents

module Arrthorizer
  module Permission
    InvalidPermission = Class.new(ArrthorizerException)

    def self.grant(privilege, config = {})
      privilege = Privilege.get(privilege)
      role          = Role.get(config[:to])

      privilege.make_accessible_to(role)
    rescue Registry::NotFound => e
      raise InvalidPermission, e.message
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
arrthorizer-0.4.2 lib/arrthorizer/permission.rb
arrthorizer-0.4.1 lib/arrthorizer/permission.rb
arrthorizer-0.3.2 lib/arrthorizer/permission.rb
arrthorizer-0.3.1 lib/arrthorizer/permission.rb
arrthorizer-0.3.0 lib/arrthorizer/permission.rb
arrthorizer-0.2.1 lib/arrthorizer/permission.rb
arrthorizer-0.2.0 lib/arrthorizer/permission.rb
arrthorizer-0.1.3 lib/arrthorizer/permission.rb
arrthorizer-0.1.2 lib/arrthorizer/permission.rb
arrthorizer-0.1.1 lib/arrthorizer/permission.rb
arrthorizer-0.1.0 lib/arrthorizer/permission.rb
arrthorizer-0.1.0.pre2 lib/arrthorizer/permission.rb
arrthorizer-0.1.0.pre lib/arrthorizer/permission.rb