mirror of https://gitlab.crans.org/bde/nk20
Fix CI
This commit is contained in:
parent
5c9c0bbc2a
commit
8ad464ae0c
|
@ -10,8 +10,8 @@ from django.db.models import Q, F
|
||||||
from note.models import Note, NoteUser, NoteClub, NoteSpecial
|
from note.models import Note, NoteUser, NoteClub, NoteSpecial
|
||||||
from note_kfet.middlewares import get_current_session
|
from note_kfet.middlewares import get_current_session
|
||||||
from member.models import Membership, Club
|
from member.models import Membership, Club
|
||||||
from .decorators import memoize
|
|
||||||
|
|
||||||
|
from .decorators import memoize
|
||||||
from .models import Permission
|
from .models import Permission
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ class PermissionBackend(ModelBackend):
|
||||||
rolepermissions__role__membership__date_end__gte=datetime.date.today(),
|
rolepermissions__role__membership__date_end__gte=datetime.date.today(),
|
||||||
type=t,
|
type=t,
|
||||||
mask__rank__lte=get_current_session().get("permission_mask", 0),
|
mask__rank__lte=get_current_session().get("permission_mask", 0),
|
||||||
).distinct('club', 'pk')
|
).distinct('club', 'pk',)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def permissions(user, model, type):
|
def permissions(user, model, type):
|
||||||
|
|
|
@ -53,4 +53,4 @@ def memoize(f):
|
||||||
|
|
||||||
func.func_name = f.__name__
|
func.func_name = f.__name__
|
||||||
|
|
||||||
return func
|
return func
|
||||||
|
|
Loading…
Reference in New Issue