diff options
| author | Xavier Ordoquy | 2014-05-01 08:01:38 +0200 |
|---|---|---|
| committer | Xavier Ordoquy | 2014-05-01 08:01:38 +0200 |
| commit | 7b4463f73983e36f228e6af0ff8c921d4698a9b3 (patch) | |
| tree | c26fd01425a3754e65a0b2c48694ca734278745f /rest_framework/permissions.py | |
| parent | 2aca69a94601858a462060bc55154c812f70fb91 (diff) | |
| parent | c9e6f31166ebccc5c3bf2f27e12a6d6c87f5cf22 (diff) | |
| download | django-rest-framework-7b4463f73983e36f228e6af0ff8c921d4698a9b3.tar.bz2 | |
Merge remote-tracking branch 'reference/2.4.0' into feature/pytest
Conflicts:
rest_framework/runtests/urls.py
tests/test_response.py
tox.ini
Diffstat (limited to 'rest_framework/permissions.py')
| -rw-r--r-- | rest_framework/permissions.py | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/rest_framework/permissions.py b/rest_framework/permissions.py index f24a5123..c9517138 100644 --- a/rest_framework/permissions.py +++ b/rest_framework/permissions.py @@ -2,15 +2,12 @@ Provides a set of pluggable permission policies. """ from __future__ import unicode_literals -import inspect -import warnings - -SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS'] - from django.http import Http404 from rest_framework.compat import (get_model_name, oauth2_provider_scope, oauth2_constants) +SAFE_METHODS = ['GET', 'HEAD', 'OPTIONS'] + class BasePermission(object): """ @@ -27,13 +24,6 @@ class BasePermission(object): """ Return `True` if permission is granted, `False` otherwise. """ - if len(inspect.getargspec(self.has_permission).args) == 4: - warnings.warn( - 'The `obj` argument in `has_permission` is deprecated. ' - 'Use `has_object_permission()` instead for object permissions.', - DeprecationWarning, stacklevel=2 - ) - return self.has_permission(request, view, obj) return True |
