mirror of
https://gitlab.crans.org/bde/nk20
synced 2025-06-21 01:48:21 +02:00
nerf invalidate perm
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
# Copyright (C) 2018-2024 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from datetime import date
|
||||
from datetime import date, timedelta
|
||||
|
||||
from django.contrib.auth.backends import ModelBackend
|
||||
from django.contrib.auth.models import User
|
||||
@ -106,6 +106,7 @@ class PermissionBackend(ModelBackend):
|
||||
Q=Q,
|
||||
now=timezone.now(),
|
||||
today=date.today(),
|
||||
week=timedelta(days=7),
|
||||
)
|
||||
yield permission
|
||||
|
||||
|
Reference in New Issue
Block a user