mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 06:42:16 +00:00
Fixed a few instances where api settings would go not setup
This commit is contained in:
@@ -42,5 +42,7 @@ class ValidateDisabledUsers():
|
|||||||
def job(self):
|
def job(self):
|
||||||
for servacc in ServiceAccount.objects.filter(active=0):
|
for servacc in ServiceAccount.objects.filter(active=0):
|
||||||
self._logger.info('Checking %s' % servacc)
|
self._logger.info('Checking %s' % servacc)
|
||||||
if not servacc.service.api_class.disable_user(servacc.service_uid):
|
api = servacc.service.api_class
|
||||||
|
api.settings = servacc.service.settings
|
||||||
|
if not api.disable_user(servacc.service_uid):
|
||||||
self._logger.error('Error disabling %s on %s' % (servacc, servacc.service))
|
self._logger.error('Error disabling %s on %s' % (servacc, servacc.service))
|
||||||
|
|||||||
@@ -212,6 +212,7 @@ def service_reset(request, serviceid=0):
|
|||||||
passwd = form.cleaned_data['password']
|
passwd = form.cleaned_data['password']
|
||||||
|
|
||||||
api = acc.service.api_class
|
api = acc.service.api_class
|
||||||
|
api.settings = acc.service.settings
|
||||||
if not api.reset_password(acc.service_uid, passwd):
|
if not api.reset_password(acc.service_uid, passwd):
|
||||||
error = True
|
error = True
|
||||||
return render_to_response('sso/serviceaccount/resetcomplete.html', locals(), context_instance=RequestContext(request))
|
return render_to_response('sso/serviceaccount/resetcomplete.html', locals(), context_instance=RequestContext(request))
|
||||||
|
|||||||
Reference in New Issue
Block a user