Sha256: 0c6405e36c6e317162dbd8e4903f4280894ad5bc2aef0b82e842d0c97a03e53d

Contents?: true

Size: 603 Bytes

Versions: 9

Compression:

Stored size: 603 Bytes

Contents

require 'spiderfw/model/mixins/tree'
require 'apps/core/auth/models/mixins/access_control'
require 'uuid'

module Spider; module Auth
    
    class Group < Spider::Model::BaseModel
        include Spider::Model::Tree
        tree :subgroups
        element :gid, String, :primary_key => true
        element :label, String, :required => true, :check => /[\w\d_]+/, :unique => true
        element :name, String
        
        with_mapper_subclasses do
            def assign_primary_keys(obj)
                obj.set(:gid, UUID.new.generate)
            end
        end
        
    end
    
end; end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
spiderfw-0.5.9 apps/core/auth/models/group.rb
spiderfw-0.5.7 apps/core/auth/models/group.rb
spiderfw-0.5.6 apps/core/auth/models/group.rb
spiderfw-0.5.5 apps/core/auth/models/group.rb
spiderfw-0.5.4 apps/core/auth/models/group.rb
spiderfw-0.5.3 apps/core/auth/models/group.rb
spiderfw-0.5.2 apps/core/auth/models/group.rb
spiderfw-0.5.1 apps/core/auth/models/group.rb
spiderfw-0.5 apps/core/auth/models/group.rb