diff --git a/equipment/models.py b/equipment/models.py index f8db97a..6498756 100644 --- a/equipment/models.py +++ b/equipment/models.py @@ -16,7 +16,6 @@ class Equipment(EventSpecificMixin, models.Model): related_name="equipment", through="EquipmentAttribution", ) - needs_event_permissions = True class Meta: verbose_name = _("matériel") @@ -31,7 +30,6 @@ class EquipmentAttribution(models.Model): activity = models.ForeignKey(Activity) amount = models.PositiveSmallIntegerField(_("quantité attribuée")) remarks = models.TextField(_("remarques concernant l'attribution")) - needs_event_permissions = True class Meta: verbose_name = _("attribution de matériel") diff --git a/event/models.py b/event/models.py index 83cd985..37a44d4 100644 --- a/event/models.py +++ b/event/models.py @@ -50,6 +50,7 @@ class EventSpecificMixin(models.Model): blank=True, null=True ) + needs_event_permissions = True class Meta: abstract = True @@ -61,7 +62,6 @@ class Place(EventSpecificMixin, models.Model): max_length=200, ) description = models.TextField(blank=True) - needs_event_permissions = True class Meta: verbose_name = _("lieu") @@ -93,7 +93,6 @@ class ActivityTag(EventSpecificMixin, models.Model): validators=[color_regex], help_text=_("Rentrer une couleur en hexadécimal"), ) - needs_event_permissions = True class Meta: verbose_name = _("tag") @@ -148,13 +147,13 @@ class AbstractActivityTemplate(SubscriptionMixin, models.Model): Place, blank=True, ) + needs_event_permissions = True class Meta: abstract = True class ActivityTemplate(AbstractActivityTemplate): - needs_event_permissions = True class Meta: verbose_name = _("template activité") @@ -177,7 +176,6 @@ class Activity(AbstractActivityTemplate): beginning = models.DateTimeField(_("heure de début")) end = models.DateTimeField(_("heure de fin")) - needs_event_permissions = True def get_herited(self, attrname): inherited_fields = [f.name for f in ActivityTemplate._meta.get_fields()]