aboutsummaryrefslogtreecommitdiffstats
path: root/djangorestframework/mixins.py
diff options
context:
space:
mode:
Diffstat (limited to 'djangorestframework/mixins.py')
-rw-r--r--djangorestframework/mixins.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/djangorestframework/mixins.py b/djangorestframework/mixins.py
index d1014a84..28fa5847 100644
--- a/djangorestframework/mixins.py
+++ b/djangorestframework/mixins.py
@@ -15,7 +15,6 @@ from djangorestframework.response import Response, ImmediateResponse
__all__ = (
# Base behavior mixins
- 'PermissionsMixin',
'ResourceMixin',
# Model behavior mixins
'ReadModelMixin',
@@ -27,35 +26,6 @@ __all__ = (
)
-########## Permissions Mixin ##########
-
-class PermissionsMixin(object):
- """
- Simple :class:`mixin` class to add permission checking to a :class:`View` class.
- """
-
- permissions_classes = ()
- """
- The set of permissions that will be enforced on this view.
-
- Should be a tuple/list of classes as described in the :mod:`permissions` module.
- """
-
- def get_permissions(self):
- """
- Instantiates and returns the list of permissions that this view requires.
- """
- return [p(self) for p in self.permissions_classes]
-
- # TODO: wrap this behavior around dispatch()
- def check_permissions(self, user):
- """
- Check user permissions and either raise an ``ImmediateResponse`` or return.
- """
- for permission in self.get_permissions():
- permission.check_permission(user)
-
-
########## Resource Mixin ##########
class ResourceMixin(object):