Sha256: 8e1b8a4e7f55a25b20198f617e34a6b1e4589d08357a515c619294275ac7f102

Contents?: true

Size: 511 Bytes

Versions: 6

Compression:

Stored size: 511 Bytes

Contents

require 'apps/core/auth/models/mixins/rbac_provider'

module RBAC

    def self.define_context(name, permissions=nil, options={})
        permissions ||= Spider::OrderedHash[]
        @contexts ||= {}
        @contexts[name] = permissions 
        @options ||= {}
        @options[name] = options
    end

    def self.context(name)
        @contexts[name]
    end
    
    def self.context?(name)
        @contexts[name] != nil
    end
    
    def self.options(name)
        @options[name] || {}
    end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spiderfw-0.5.19 apps/core/auth/lib/rbac.rb
spiderfw-0.5.18 apps/core/auth/lib/rbac.rb
spiderfw-0.5.17 apps/core/auth/lib/rbac.rb
spiderfw-0.5.16 apps/core/auth/lib/rbac.rb
spiderfw-0.5.15 apps/core/auth/lib/rbac.rb
spiderfw-0.5.14 apps/core/auth/lib/rbac.rb