{"repo":"redzej/graphene-permissions","free":true,"listed":false,"github":"https://github.com/redzej/graphene-permissions","clone":"git clone https://github.com/redzej/graphene-permissions.git","description":"Customizable permissions for graphene-django.","language":"Python","stars":79,"topics":["graphene-django","graphene-permissions","permissions","graphene","python","mutations","django","django-graphene-permissions","django-graphene","mixins"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"graphene-permissions Permission system for graphene-django apps. Overview DRF-inspired permission system based on classes for graphene-django. Allows easy customization of permission classes for for queries and mutations. Requirements Python 3.5+ Django 2.0+ graphene-django 2.0+ Installation Install using pip: Example To enforce permission system, add appropriate mixin and set attribute permission classes . Docs Setting up permission check For queries use AuthNode mixin and inherite from AuthFilter class. For mutations use AuthMutation mixin. Customizing permission classes Default permission classes are: AllowAny , AllowAuthenticated , AllowStaff . You can set up equal permission for both queries and mutations with one class, simply subclass one of these classes and to limit access for given object, override appropriate method. Remember to return true if user should be given access and false , if denied. Multiple permissions You can set up multiple permissions checks, simply adding more classes. Permission is evaluated for every class. If one of the checks fails, access is denied.","default_branch":null,"files":null,"tree":[],"storefront":"/r/redzej","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/redzej/graphene-permissions/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}