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
|
self.layer = true
|
||||||
|
|
||||||
# TODO: define actual child group types
|
|
||||||
children Group::Circle, Group::HelpCircle
|
|
||||||
|
|
||||||
### ROLES
|
### ROLES
|
||||||
|
|
||||||
# TODO: define actual role types
|
|
||||||
class Leader < ::Role
|
class Leader < ::Role
|
||||||
self.permissions = [:layer_and_below_full, :admin]
|
self.permissions = [:layer_and_below_full, :admin]
|
||||||
end
|
end
|
||||||
|
@ -18,6 +13,10 @@ class Group::Circle < ::Group
|
||||||
self.permissions = [:group_read]
|
self.permissions = [:group_read]
|
||||||
end
|
end
|
||||||
|
|
||||||
roles Leader, Member
|
class Guest < ::Role
|
||||||
|
self.permissions = []
|
||||||
|
end
|
||||||
|
|
||||||
|
roles Leader, Member, Guest
|
||||||
|
|
||||||
end
|
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.used_attributes += [:website, :bank_account, :description]
|
||||||
# self.superior_attributes = [:bank_account]
|
# self.superior_attributes = [:bank_account]
|
||||||
|
|
||||||
root_types Group::Circle
|
::Group.root_types(::Group::TopLayer)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,9 +7,9 @@ de:
|
||||||
group/circle:
|
group/circle:
|
||||||
one: Kreis
|
one: Kreis
|
||||||
other: Kreise
|
other: Kreise
|
||||||
group/help_circle:
|
group/top_layer:
|
||||||
one: Hilfkreis
|
one: Hauptebene
|
||||||
other: Hilfskreise
|
other: Hauptebene
|
||||||
|
|
||||||
### ROLES
|
### ROLES
|
||||||
|
|
||||||
|
@ -18,4 +18,16 @@ de:
|
||||||
description: Leitungspersonen verwalten die Applikation.
|
description: Leitungspersonen verwalten die Applikation.
|
||||||
group/circle/member:
|
group/circle/member:
|
||||||
one: Mitglied
|
one: Mitglied
|
||||||
description: Mitglieder sind alle anderen.
|
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
|
root = Group.root
|
||||||
devs.each do |name, email|
|
devs.each do |name, email|
|
||||||
seeder.seed_developer(name, email, root, Group::Circle::Leader)
|
seeder.seed_developer(name, email, root, Group::TopLayer::Leader)
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
# encoding: utf-8
|
# 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