Commit e5ecd5ff by François C.

Prevent associated people to change shift template if not allowed (by default)

parent 5484e630
Pipeline #2459 passed with stage
in 2 minutes 1 second
...@@ -184,6 +184,9 @@ def home(request): ...@@ -184,6 +184,9 @@ def home(request):
partnerData = cs.get_data_partner(partner_id) partnerData = cs.get_data_partner(partner_id)
if partnerData['cooperative_state'] == "unsubscribed": if partnerData['cooperative_state'] == "unsubscribed":
coop_can_change_shift_template = False coop_can_change_shift_template = False
if getattr(settings, 'ASSOCIATE_PEOPLE_CAN_CHANGE_SHIFT_TEMPLE_REGISTRATION', False) is False:
if partnerData['is_associated_people'] is True:
coop_can_change_shift_template = False
context = { context = {
'title': 'Espace Membres', 'title': 'Espace Membres',
'coop_can_change_shift_template': coop_can_change_shift_template, 'coop_can_change_shift_template': coop_can_change_shift_template,
......
...@@ -346,6 +346,10 @@ ...@@ -346,6 +346,10 @@
By default, False. Set if coop can or not add shifts in their memberspace calendar By default, False. Set if coop can or not add shifts in their memberspace calendar
- ASSOCIATE_PEOPLE_CAN_CHANGE_SHIFT_TEMPLE_REGISTRATION = True
By default, False.
### Reception ### Reception
- RECEPTION_ADD_ADMIN_MODE = True - RECEPTION_ADD_ADMIN_MODE = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment