Sha256: fbddb442a431ed30e54909213f1a4f57d9f7f54e42735d1ba3183c1e9f9352d3
Contents?: true
Size: 310 Bytes
Versions: 2
Compression:
Stored size: 310 Bytes
Contents
module Recurso module Queries Single = Struct.new(:identity, :resource, :action) do def permission? @permission ||= identity.permissions.exists?( resource: resource.relevant_resources, level: resource.relevant_levels_for(action) ) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
recurso-0.6.1 | lib/recurso/queries/single.rb |
recurso-0.5.3 | lib/recurso/queries/single.rb |