1 # -*- encoding: utf-8 -*-
3 from django
.contrib
.auth
.decorators
import user_passes_test
4 from django
.contrib
.auth
.models
import Group
6 # Logique AUF des permissions
9 return user
.is_authenticated() and user
.is_active
and user
.is_staff
13 Un admin est un employé qui est superuser
15 return is_employe(user
) and user
.is_superuser