Revision fcf90160 snf-astakos-app/astakos/im/api/admin.py
b/snf-astakos-app/astakos/im/api/admin.py | ||
---|---|---|
98 | 98 |
if (time() - mktime(user.auth_token_expires.timetuple())) > 0: |
99 | 99 |
raise Unauthorized('Authentication expired') |
100 | 100 |
|
101 |
if not user.signed_terms():
|
|
101 |
if not user.signed_terms: |
|
102 | 102 |
raise Unauthorized('Pending approval terms') |
103 | 103 |
|
104 | 104 |
response = HttpResponse() |
... | ... | |
109 | 109 |
'auth_token_created':user.auth_token_created.isoformat(), |
110 | 110 |
'auth_token_expires':user.auth_token_expires.isoformat(), |
111 | 111 |
'has_credits':user.has_credits, |
112 |
'has_signed_terms':user.signed_terms(),
|
|
112 |
'has_signed_terms':user.signed_terms, |
|
113 | 113 |
'groups':[g.name for g in user.groups.all()]} |
114 | 114 |
response.content = json.dumps(user_info) |
115 | 115 |
response['Content-Type'] = 'application/json; charset=UTF-8' |
... | ... | |
133 | 133 |
if (time() - mktime(user.auth_token_expires.timetuple())) > 0: |
134 | 134 |
raise Unauthorized('Authentication expired') |
135 | 135 |
|
136 |
if not user.signed_terms():
|
|
136 |
if not user.signed_terms: |
|
137 | 137 |
raise Unauthorized('Pending approval terms') |
138 | 138 |
|
139 | 139 |
response = HttpResponse() |
Also available in: Unified diff