mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-12-25 06:22:23 +00:00
Users can log in iff they are or were a member, don't display the database to everyone
This commit is contained in:
parent
41435a6838
commit
aceb0d893c
@ -83,6 +83,9 @@ class User(AbstractUser):
|
||||
date_end=membership_dict['date_end'],
|
||||
)
|
||||
|
||||
# Only members or old members are allow to connect to the website
|
||||
self.is_active = Membership.objects.filter(user=self).exists()
|
||||
|
||||
|
||||
class Membership(models.Model):
|
||||
user = models.ForeignKey(
|
||||
|
Loading…
Reference in New Issue
Block a user