This commit is contained in:
Philipp Rothmann 2022-12-20 16:26:37 +01:00
commit 135b14c868
35 changed files with 1363 additions and 0 deletions

24
app/models/group/root.rb Normal file
View 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
View 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