graphene-permissions
graphene-permissions copied to clipboard
Django integration
How do you feel about permission classes which are not static like AllowAuthenticated or AllowSuperuser but which need to be instantiated. I can imagine some scenarios where the option to only customize permission classes with class variables is not enough. In my project I had some problems integrating this module with djangos integrated permissions feature. So I wrote a permission class like: AllowDjangoPermission("app_name.create_model"). Or something like AllowObjectOwner(related_object_path). Is this a feature you would be interested in? I could create a new PullRequest after the feature to combine classes with operators is merged.
This package was prepared for couple side projects, where all possible scenarios were not explored. Any extension that expands permissions and is useful for more people will be welcome.