Skip to content

Commit

Permalink
Fix unauthorized user error in get_xls
Browse files Browse the repository at this point in the history
  • Loading branch information
SakshiUppoor committed Mar 27, 2020
1 parent 245e1a7 commit c5da41a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion placementApp/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class IsStaff(BasePermission):
message = "You do not have the permission to perform this action."

def has_permission(self, request, view):
return request.user.is_co() or request.user.is_tpo()
return request.user.is_authenticated and (
request.user.is_co() or request.user.is_tpo()
)

def has_object_permission(self, request, view, obj):
return True

0 comments on commit c5da41a

Please sign in to comment.