0001-misc-remove-usage-of-CallableTrue-41239.patch
hobo/rest_authentication.py | ||
---|---|---|
8 | 8 |
from django.conf import settings |
9 | 9 |
from django.contrib.auth.models import AnonymousUser |
10 | 10 |
from django.db.models.fields import FieldDoesNotExist |
11 |
from django.utils.deprecation import CallableTrue |
|
12 | 11 |
from django.utils.module_loading import import_string |
13 | 12 | |
14 | 13 |
try: |
... | ... | |
19 | 18 | |
20 | 19 |
class AnonymousAuthenticServiceUser(AnonymousUser): |
21 | 20 |
'''This virtual user hold permissions for other publik services''' |
22 | ||
23 |
@property |
|
24 |
def is_anonymous(self): |
|
25 |
return CallableTrue |
|
26 | ||
27 |
@property |
|
28 |
def is_authenticated(self): |
|
29 |
return CallableTrue |
|
21 |
is_anonymous = True |
|
22 |
is_authenticated = True |
|
30 | 23 | |
31 | 24 |
def has_perm(self, perm_or_perms, obj=None): |
32 | 25 |
return True |
... | ... | |
48 | 41 |
class AnonymousAdminServiceUser(AnonymousUser): |
49 | 42 |
'''This virtual user hold permissions for other publik services''' |
50 | 43 |
is_staff = True |
51 | ||
52 |
@property |
|
53 |
def is_anonymous(self): |
|
54 |
return CallableTrue |
|
55 | ||
56 |
@property |
|
57 |
def is_authenticated(self): |
|
58 |
return CallableTrue |
|
44 |
is_anonymous = True |
|
45 |
is_authenticated = True |
|
59 | 46 | |
60 | 47 |
def __unicode__(self): |
61 | 48 |
return 'Publik Service Admin' |
62 |
- |