1
0
mirror of https://gitlab.crans.org/bde/nk20 synced 2025-06-21 18:08:21 +02:00

Open and validate activities

This commit is contained in:
Yohann D'ANELLO
2020-03-27 22:48:20 +01:00
parent d6e202a26f
commit 8c1d902c30
6 changed files with 121 additions and 18 deletions

View File

@ -48,9 +48,7 @@ def not_empty_model_change_list(model_name):
return session.get("not_empty_model_change_list_" + model_name) == 1
def has_perm(t, obj, field=None):
print(t)
perm = "." + t + ("__" + field if field else "_")
def has_perm(perm, obj):
return PermissionBackend().has_perm(get_current_authenticated_user(), perm, obj)