Open jayvdb opened 4 years ago
DRF support would indeed be nice to have, though I do not have time to build out such a feature currently. I'd be willing to look over any PRs that add this.
It seems easy enough to read the permission_classes
attribute on views and pull out the class -- one tricky bit being figuring out how to parse bitwise operations.
It seems there isnt any DRF support yet.
There are lots of aspects to the DRF permissions system.
One re-usable method in DRF which can be used to determine broadly which actions are allowed is via the metadata https://github.com/encode/django-rest-framework/blob/335054a/rest_framework/metadata.py#L73
More info at https://github.com/encode/django-rest-framework/blob/master/docs/api-guide/metadata.md