Skip to content

Commit

Permalink
Considerate improved performance; no query per has_permission call #182
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron van der Vegt committed Mar 9, 2017
1 parent 493386c commit 1eca8b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ Always reference the ticket number at the end of the issue description.
###Changed

- Added full Django 1.10 compatibility - [#164][164]
- Considerate improved performance; no query per has_permission call - [#182][182]

[164]: //github.com/sanoma/django-arctic/issues/164
[182]: //github.com/sanoma/django-arctic/issues/182


##0.9.4 (2017-02-23)
Expand Down
2 changes: 1 addition & 1 deletion arctic/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def has_permission(cls, user):
return True

# get role of user, skip admin role
role = UserRole.objects.get(user=user).role.name
role = user.urole.role.name
if role == cls.ADMIN:
return True

Expand Down

0 comments on commit 1eca8b5

Please sign in to comment.