Skip to content

Commit

Permalink
Refactored name.
Browse files Browse the repository at this point in the history
  • Loading branch information
bartmika committed Jan 27, 2018
1 parent 4ca25e6 commit aeedd9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 1.0.2

- Added 'IsUserNotSuspendedPermission' permission class for the `djangorestframework`.
- Added 'IsAuthenticatedAndIsActivePermission' permission class for the `djangorestframework`.

## 1.0.1

Expand Down
2 changes: 1 addition & 1 deletion starterkit/drf/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from rest_framework import permissions


class IsUserNotSuspendedPermission(permissions.BasePermission):
class IsAuthenticatedAndIsActivePermission(permissions.BasePermission):
message = _('You do not have permission to access this API-endpoint because your account is suspended.')

def has_permission(self, request, view):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ def tearDown(self):
del self.view
super(TestPermissions, self).tearDown()

def test_is_user_not_suspended_permission(self):
def test_is_auth_and_is_active_permission(self):
# Variable is just a sample object.
mock_object = MagicMock()

# Variable is our permission class.
permission = IsUserNotSuspendedPermission()
permission = IsAuthenticatedAndIsActivePermission()

# VIEW BASED.

Expand Down

0 comments on commit aeedd9f

Please sign in to comment.