update structure
This commit is contained in:
parent
c95271682d
commit
336e2c3c48
7 changed files with 48 additions and 19 deletions
|
@ -4,12 +4,7 @@ class Group::Circle < ::Group
|
|||
|
||||
self.layer = true
|
||||
|
||||
# TODO: define actual child group types
|
||||
children Group::Circle, Group::HelpCircle
|
||||
|
||||
### ROLES
|
||||
|
||||
# TODO: define actual role types
|
||||
class Leader < ::Role
|
||||
self.permissions = [:layer_and_below_full, :admin]
|
||||
end
|
||||
|
@ -18,6 +13,10 @@ class Group::Circle < ::Group
|
|||
self.permissions = [:group_read]
|
||||
end
|
||||
|
||||
roles Leader, Member
|
||||
class Guest < ::Role
|
||||
self.permissions = []
|
||||
end
|
||||
|
||||
roles Leader, Member, Guest
|
||||
|
||||
end
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# encoding: utf-8
|
||||
|
||||
# TODO: rename class to specific name and change all references
|
||||
class Group::HelpCircle < ::Group
|
||||
self.layer = true
|
||||
end
|
24
app/models/group/top_layer.rb
Normal file
24
app/models/group/top_layer.rb
Normal file
|
@ -0,0 +1,24 @@
|
|||
# encoding: utf-8
|
||||
|
||||
class Group::TopLayer < ::Group
|
||||
|
||||
self.layer = true
|
||||
|
||||
children Group::Circle
|
||||
|
||||
### ROLES
|
||||
class Leader < ::Role
|
||||
self.permissions = [:layer_and_below_full, :admin]
|
||||
end
|
||||
|
||||
class Member < ::Role
|
||||
self.permissions = [:group_read]
|
||||
end
|
||||
|
||||
class Guest < ::Role
|
||||
self.permissions = []
|
||||
end
|
||||
|
||||
roles Leader, Member, Guest
|
||||
|
||||
end
|
|
@ -8,7 +8,7 @@ module Lit::Group
|
|||
# self.used_attributes += [:website, :bank_account, :description]
|
||||
# self.superior_attributes = [:bank_account]
|
||||
|
||||
root_types Group::Circle
|
||||
::Group.root_types(::Group::TopLayer)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -7,9 +7,9 @@ de:
|
|||
group/circle:
|
||||
one: Kreis
|
||||
other: Kreise
|
||||
group/help_circle:
|
||||
one: Hilfkreis
|
||||
other: Hilfskreise
|
||||
group/top_layer:
|
||||
one: Hauptebene
|
||||
other: Hauptebene
|
||||
|
||||
### ROLES
|
||||
|
||||
|
@ -19,3 +19,15 @@ de:
|
|||
group/circle/member:
|
||||
one: Mitglied
|
||||
description: Mitglieder sind alle anderen.
|
||||
group/circle/guest:
|
||||
one: Gast
|
||||
description: Gast
|
||||
group/top_layer/leader:
|
||||
one: Leitung
|
||||
description: Leitungspersonen verwalten die Applikation.
|
||||
group/top_layer/member:
|
||||
one: Mitglied
|
||||
description: Mitglieder sind alle anderen.
|
||||
group/top_layer/guest:
|
||||
one: Gast
|
||||
description: Gast
|
|
@ -24,5 +24,5 @@ seeder.seed_all_roles
|
|||
|
||||
root = Group.root
|
||||
devs.each do |name, email|
|
||||
seeder.seed_developer(name, email, root, Group::Circle::Leader)
|
||||
seeder.seed_developer(name, email, root, Group::TopLayer::Leader)
|
||||
end
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
# encoding: utf-8
|
||||
|
||||
Group::Circle.seed_once(:parent_id, name: 'Koordinationskreis')
|
||||
Group::TopLayer.seed_once(:parent_id, name: 'Local-IT')
|
||||
|
|
Loading…
Reference in a new issue