mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-09 19:40:19 +00:00
Delete function + club tabs
This commit is contained in:
@ -518,9 +518,14 @@ class User(AbstractBaseUser):
|
||||
infos.save()
|
||||
return infos
|
||||
|
||||
def get_clubs_with_rights(self):
|
||||
@cached_property
|
||||
def clubs_with_rights(self):
|
||||
return [m.club.id for m in self.memberships.filter(models.Q(end_date__isnull=True) | models.Q(end_date__gte=timezone.now())).all() if m.club.has_rights_in_club(self)]
|
||||
|
||||
@cached_property
|
||||
def is_com_admin(self):
|
||||
return self.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID)
|
||||
|
||||
|
||||
class AnonymousUser(AuthAnonymousUser):
|
||||
def __init__(self, request):
|
||||
|
@ -169,6 +169,7 @@
|
||||
</ul>
|
||||
|
||||
<div id="content">
|
||||
{{ object }}
|
||||
{% if list_of_tabs %}
|
||||
<div class="tool_bar">
|
||||
<div>{{ tabs_title }}</div>
|
||||
|
Reference in New Issue
Block a user