Comments (2)
Hi @justinask7 , I just released a new version with the change and it should be hitting pypi's repository in the next minutes.
Feel free to open any other issues regarding problems you find or even suggestions for the lib!
from graphene-django-plus.
Hi @justinask7 ,
The change was made because, actually, it would never return False
(at least not after v1.4). The problem is, based on the fact that GuardedModelManager.for_user
should return a queryset that can only contain models that the user can see, the get_node
function would already filter any object that doesn't have permissions out, so the object there will be None
(as you can see in this NOTE: https://github.com/0soft/graphene-django-plus/blob/master/graphene_django_plus/types.py#L148).
You are saying in point number 2 that it was useful for some extra business logic. What version were you using before upgrading to this one? There was an issue before v1.4 that was making optimized models not use the type's queryset but the base queryset instead (optimizer passes cls._meta.model.objects
instead of c.get_queryset
, which is oposed to what the default get_node does), which I fixed in this commit.
But having said all that, I can add a call to it back so that one can do some extra checking in it. It will not affect the default implementation because of the reasons I explained in the first paragraph.
Thanks for pointing that out and glad to see other people using this library :)
from graphene-django-plus.
Related Issues (17)
- Make relay interface optional
- ModelCreateMutation generates required fields for CharFields without null=True. HOT 4
- BaseModelMutation doesn't generate input fields for reverse foreign key relationships. HOT 1
- Issues with new 2.3 release HOT 10
- Any plans on merging this functionality with graphene-django? HOT 2
- Check object_permissions argument before check permission inside get_node on ModelType class HOT 2
- #support #UploadType HOT 4
- Can you add where as input in the query too with this library as in graphene-django-crud library? HOT 1
- When and where to set some field value before mutation? HOT 6
- Why UUID is a Telephone Type? HOT 1
- 'FloatField' object has no attribute 'max_digits' HOT 2
- Use without relay? HOT 2
- ObjectPermissionChecker is undefined when launching without django-guardian installed
- This lib is DEPRECATED (read this)
- Project status - deprecated? HOT 2
- Order of imports affects the operation of the library HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from graphene-django-plus.