mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-07-04 12:52:15 +02:00
Protect some pages
This commit is contained in:
@ -59,6 +59,10 @@ class Registration(PolymorphicModel):
|
||||
def participates(self):
|
||||
return isinstance(self, StudentRegistration) or isinstance(self, CoachRegistration)
|
||||
|
||||
@property
|
||||
def is_admin(self):
|
||||
return isinstance(self, AdminRegistration) or self.user.is_superuser
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.user.first_name} {self.user.last_name}"
|
||||
|
||||
|
Reference in New Issue
Block a user