Commit 04006911 authored by Gladys Forte's avatar Gladys Forte

{dev bugfix} added decorator to download user list

parent cc753e8a
...@@ -12,6 +12,9 @@ from django.db.models import Q ...@@ -12,6 +12,9 @@ from django.db.models import Q
from rest_framework.response import Response from rest_framework.response import Response
from rest_framework.permissions import AllowAny from rest_framework.permissions import AllowAny
# from cms.applicationlayer.utilities import logged_user # from cms.applicationlayer.utilities import logged_user
from app.helper import decorators
from rest_framework.decorators import action
from app.helper.decorators import rms, error_safe
class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet): class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
...@@ -21,6 +24,7 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet): ...@@ -21,6 +24,7 @@ class UserDownloadRequest(XLSXFileMixin, ReadOnlyModelViewSet):
filename = 'User List.xlsx' filename = 'User List.xlsx'
permission_classes = (AllowAny,) permission_classes = (AllowAny,)
@decorators.rms.user_list
def list(self, request, *args, **kwargs): def list(self, request, *args, **kwargs):
# id_number = request.user.code # id_number = request.user.code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment