diff options
| author | Carlton Gibson | 2014-06-24 10:30:08 +0200 |
|---|---|---|
| committer | Carlton Gibson | 2014-06-24 10:30:08 +0200 |
| commit | d98245ac2234c2377a6243f8314b31fd68c902af (patch) | |
| tree | 5fa88ae09d97a25e20d0dbf254ad028ef4351bca /rest_framework/permissions.py | |
| parent | 3f727ce738776838d8420450ce28485954fbb097 (diff) | |
| parent | 2489e38a06f575aa144644eee683bd87f20186ef (diff) | |
| download | django-rest-framework-d98245ac2234c2377a6243f8314b31fd68c902af.tar.bz2 | |
Merge branch '2.4.0' of github.com:tomchristie/django-rest-framework into #1559
Conflicts:
docs/topics/release-notes.md
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 |
