mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-06-13 10:03:12 +03:00
Update authorization.rst
This commit is contained in:
parent
446013c752
commit
2ccd483ffc
|
@ -116,7 +116,7 @@ method to your ``DjangoObjectType``.
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_node(cls, id, info):
|
def get_node(cls, id, info):
|
||||||
try:
|
try:
|
||||||
post = cls._meta.model.objects.get(id=id, owner__user = info.context.user)
|
post = cls._meta.model.objects.get(id=id)
|
||||||
except cls._meta.model.DoesNotExist:
|
except cls._meta.model.DoesNotExist:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
@ -124,6 +124,7 @@ method to your ``DjangoObjectType``.
|
||||||
return post
|
return post
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
Adding Login Required
|
Adding Login Required
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user