Verified Commit b7483513 authored by Sli's avatar Sli
Browse files

Fix for mailing lists

parent 10dfb2c1
......@@ -296,6 +296,9 @@ class Mailing(models.Model):
def can_view(self, user):
return self.club.has_rights_in_club(user)
def can_be_edited_by(self, user):
return self.club.has_rights_in_club(user)
def delete(self):
for sub in self.subscriptions.all():
sub.delete()
......
......@@ -509,6 +509,9 @@ class ClubMailingView(ClubTabsMixin, ListView):
kwargs['has_objects'] = len(kwargs['object_list']) > 0
return kwargs
def get_object(self):
return self.club
class MailingGenericCreateView(CreateView, SingleObjectMixin):
"""
......
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