sas: allow ancient subscriber to add people on pictures

Signed-off-by: Skia <skia@libskia.so>
This commit is contained in:
Skia 2017-07-26 16:55:00 +02:00
parent 8501df0bef
commit e085556def

View File

@ -144,7 +144,7 @@ class PictureView(CanViewMixin, DetailView, FormMixin):
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
self.object = self.get_object() self.object = self.get_object()
self.form = self.get_form() self.form = self.get_form()
if request.user.is_authenticated() and request.user.is_in_group('ae-membres'): if request.user.is_authenticated() and request.user.was_subscribed:
if self.form.is_valid(): if self.form.is_valid():
for uid in self.form.cleaned_data['users']: for uid in self.form.cleaned_data['users']:
u = User.objects.filter(id=uid).first() u = User.objects.filter(id=uid).first()