Coverage for api/permissions.py: 83%
4 statements
« prev ^ index » next coverage.py v6.4.4, created at 2023-09-27 19:23 -0600
« prev ^ index » next coverage.py v6.4.4, created at 2023-09-27 19:23 -0600
1from rest_framework.permissions import BasePermission
4class ProscaiPermissions(BasePermission):
5 """
6 Allows access only to authenticated users that are employees.
7 """
9 def has_permission(self, request, view):
10 return bool(request.user and request.user.is_authenticated)