Skip to content

Commit

Permalink
patch: remove admin check (#1114)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinashechiraya authored Oct 10, 2024
1 parent b23dbac commit cbd9e53
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions django_project/minisass_authentication/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ def generate_special_token(request, email):
except User.DoesNotExist:
return JsonResponse({'error': 'User not found'}, status=404)

if not user.is_staff and not user.is_superuser:
return JsonResponse({'error': 'User is not an admin'}, status=403)

token = AccessToken.for_user(user)
# Set a very long expiration time, e.g., 100 years
token.set_exp(lifetime=timedelta(days=365 * 100))
Expand Down

0 comments on commit cbd9e53

Please sign in to comment.