-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
I have a case where I would like to use sudo access for a REST API, but it doesn't appear that this will work nicely with this framework currently.
What I would propose is basically an addition to the sudo_required decorator:
if request.is_ajax():
return HttpResponseForbidden(json.dumps({'message': 'Forbidden', 'sudo_required': True}), content_type='application/json')There would also need to be a view which could receive an AJAX payload for authentication and return the appropriate cookie.
Is this something which would be in the scope of this project, or would it be more suited to something like a django-rest-framework-sudo package?
Metadata
Metadata
Assignees
Labels
No labels