Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nchiapol committed Sep 16, 2024
1 parent bab48c0 commit 21d26ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/models/group/dachverband.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class Group::Dachverband < Group

class Administrator < ::Role
self.permissions = [:admin, :layer_and_below_full, :impersonation]
self.two_factor_authentication_enforced = true
end

roles Administrator
Expand Down
3 changes: 3 additions & 0 deletions app/models/group/dachverband_geschaeftsstelle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ class Group::DachverbandGeschaeftsstelle < Group::Geschaeftsstelle

class Geschaeftsleiter < ::Role
self.permissions = [:layer_full, :contact_data, :finance]
self.two_factor_authentication_enforced = true
end

class Angestellter < ::Role
self.permissions = [:layer_full, :contact_data, :finance]
self.two_factor_authentication_enforced = true
end

class Finanzverantwortlicher < ::Role
self.permissions = [:layer_full, :finance, :financials, :contact_data]
self.two_factor_authentication_enforced = true
end

roles Geschaeftsleiter,
Expand Down
5 changes: 5 additions & 0 deletions app/models/group/dachverband_gremium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@

class Group::DachverbandGremium < Group::Gremium
children Group::DachverbandGremium
children Group::DachverbandExterne

### ROLES

class Leitung < ::Role
self.permissions = [:layer_read, :group_and_below_full, :contact_data]
self.two_factor_authentication_enforced = true
end

# get the group_and_below_full permission as they should also be able to create events
class Mitglied < ::Role
self.permissions = [:layer_read, :group_and_below_full]
self.two_factor_authentication_enforced = true
end

# get the group_and_below_full permission as they should also be able to create events
class AktiverKursleiter < ::Role
self.permissions = [:layer_read, :group_and_below_full]
self.two_factor_authentication_enforced = true
end

# get the group_and_below_full permission as they should also be able to create events
class Kassier < ::Role
self.permissions = [:layer_read, :group_and_below_full, :finance]
self.two_factor_authentication_enforced = true
end

roles Leitung,
Expand Down
3 changes: 3 additions & 0 deletions app/models/group/dachverband_vorstand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ class Group::DachverbandVorstand < Group::Vorstand

class Praesidium < ::Role
self.permissions = [:layer_read, :group_and_below_full, :contact_data]
self.two_factor_authentication_enforced = true
end

class Finanzverantwortlicher < ::Role
self.permissions = [:layer_read, :finance, :financials, :contact_data]
self.two_factor_authentication_enforced = true
end

class Mitglied < ::Role
self.permissions = [:layer_read, :contact_data]
self.two_factor_authentication_enforced = true
end

roles Praesidium,
Expand Down
1 change: 1 addition & 0 deletions app/models/group/mitgliederorganisation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class Group::Mitgliederorganisation < Group

class Administrator < ::Role
self.permissions = [:layer_and_below_full]
self.two_factor_authentication_enforced = true
end

roles Administrator
Expand Down
4 changes: 4 additions & 0 deletions app/models/group/mitgliederorganisation_geschaeftsstelle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,22 @@ class Group::MitgliederorganisationGeschaeftsstelle < Group::Geschaeftsstelle

class Geschaeftsleiter < ::Role
self.permissions = [:layer_and_below_full, :contact_data, :finance]
self.two_factor_authentication_enforced = true
end

class Angestellter < ::Role
self.permissions = [:layer_and_below_full, :contact_data, :finance]
self.two_factor_authentication_enforced = true
end

class Finanzverantwortlicher < ::Role
self.permissions = [:layer_and_below_full, :finance, :financials, :contact_data]
self.two_factor_authentication_enforced = true
end

class AdminOrtsgruppen < ::Role
self.permissions = [:layer_and_below_full, :see_invisible_from_above, :finance]
self.two_factor_authentication_enforced = true
end

roles Geschaeftsleiter,
Expand Down
6 changes: 6 additions & 0 deletions app/models/group/mitgliederorganisation_gremium.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,33 @@

class Group::MitgliederorganisationGremium < Group::Gremium
children Group::MitgliederorganisationGremium
children Group::MitgliederorganisationExterne

### ROLES

class Leitung < ::Role
self.permissions = [:layer_and_below_read, :group_and_below_full, :contact_data]
self.two_factor_authentication_enforced = true
end

class Mitglied < ::Role
self.permissions = [:layer_and_below_read]
self.two_factor_authentication_enforced = true
end

class AktiverKursleiter < ::Role
self.permissions = [:layer_and_below_read]
self.two_factor_authentication_enforced = true
end

class Ausbildungsmitglied < ::Role
self.permissions = [:layer_and_below_read]
self.two_factor_authentication_enforced = true
end

class Kassier < ::Role
self.permissions = [:layer_and_below_read, :finance]
self.two_factor_authentication_enforced = true
end

roles Leitung,
Expand Down
3 changes: 3 additions & 0 deletions app/models/group/mitgliederorganisation_vorstand.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@ class Group::MitgliederorganisationVorstand < Group::Vorstand

class Praesidium < ::Role
self.permissions = [:layer_and_below_read, :group_and_below_full, :contact_data]
self.two_factor_authentication_enforced = true
end

class Finanzverantwortlicher < ::Role
self.permissions = [:layer_and_below_read, :finance, :financials, :contact_data]
self.two_factor_authentication_enforced = true
end

class Mitglied < ::Role
self.permissions = [:layer_and_below_read, :contact_data]
self.two_factor_authentication_enforced = true
end

roles Praesidium,
Expand Down
1 change: 1 addition & 0 deletions app/models/group/sektion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Group::Sektion < Group

class Administrator < ::Role
self.permissions = [:layer_and_below_full, :contact_data]
self.two_factor_authentication_enforced = true
end

roles Administrator
Expand Down

0 comments on commit 21d26ac

Please sign in to comment.