django-restful-admin icon indicating copy to clipboard operation
django-restful-admin copied to clipboard

Error 403 with "destroy" requests

Open hmirza0077 opened this issue 3 years ago • 2 comments

Hi I think there's a bug with DELETE requests. In your "get_permission_map" method, you have a dictionary that contains all the request methods. The key of this dictionary with deletion operations is "delete". And in your "_has_perm_action" method, you're checking that whether "action" is in your dictionary(perm_map) or not but in deletion operations "action" will be equal to "destroy" and that means for all DELETE requests, we have an 403 Error.

hmirza0077 avatar Apr 26 '21 12:04 hmirza0077

Is there anyone who could overcome this issue?

the-einstein avatar Jun 24 '21 12:06 the-einstein

@the-einstein @hmirza0077 can you create a pull request for this issue?

amirasaran avatar Nov 27 '21 09:11 amirasaran