init
This commit is contained in:
commit
135b14c868
35 changed files with 1363 additions and 0 deletions
24
app/models/group/root.rb
Normal file
24
app/models/group/root.rb
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# encoding: utf-8
|
||||
|
||||
# TODO: rename class to specific name and change all references
|
||||
class Group::Root < ::Group
|
||||
|
||||
self.layer = true
|
||||
|
||||
# TODO: define actual child group types
|
||||
children Group::Root
|
||||
|
||||
### ROLES
|
||||
|
||||
# TODO: define actual role types
|
||||
class Leader < ::Role
|
||||
self.permissions = [:layer_and_below_full, :admin]
|
||||
end
|
||||
|
||||
class Member < ::Role
|
||||
self.permissions = [:group_read]
|
||||
end
|
||||
|
||||
roles Leader, Member
|
||||
|
||||
end
|
||||
14
app/models/lit/group.rb
Normal file
14
app/models/lit/group.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# encoding: utf-8
|
||||
|
||||
module Lit::Group
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
# Define additional used attributes
|
||||
# self.used_attributes += [:website, :bank_account, :description]
|
||||
# self.superior_attributes = [:bank_account]
|
||||
|
||||
root_types Group::Root
|
||||
end
|
||||
|
||||
end
|
||||
Reference in a new issue