This website requires JavaScript.
Explore
Help
Register
Sign In
encode
/
django-rest-framework
Watch
1
Star
1
Fork
0
You've already forked django-rest-framework
mirror of
https://github.com/encode/django-rest-framework.git
synced
2024-11-28 12:34:00 +03:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
6019f1d978
django-rest-framework
/
setup.cfg
4 lines
100 B
INI
Raw
Normal View
History
Unescape
Escape
Move flake8 config to setup.cfg This allows for flake8 to pick it up when running it by itself.
2017-05-16 13:18:33 +03:00
[flake8]
Change semantic of OR of two permission classes (#7522) * Change semantic of OR of two permission classes The original semantic of OR is defined as: the request pass either of the two has_permission() check, and pass either of the two has_object_permission() check, which could lead to situations that a request passes has_permission() but fails on has_object_permission() of Permission Class A, fails has_permission() but passes has_object_permission() of Permission Class B, passes the OR permission check. This should not be the desired permission check semantic in applications, because such a request should fail on either Permission Class (on Django object permission) alone, but passes the OR or the two. My code fix this by changing the semantic so that the request has to pass either class's has_permission() and has_object_permission() to get the Django object permission of the OR check. * Update rest_framework/permissions.py * Update setup.cfg Co-authored-by: Mark Yu <markyu98@outlook.com> Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-09-21 14:19:33 +03:00
ignore
=
E501,W503,W504
Add banned imports to prevent standard json import
2017-07-11 00:22:55 +03:00
banned-modules
=
json = use from rest_framework.utils import json!
Reference in New Issue
Copy Permalink