diff --git a/sso/views.py b/sso/views.py index dfa6f02..3f52744 100644 --- a/sso/views.py +++ b/sso/views.py @@ -215,7 +215,8 @@ def service_reset(request, serviceid=0): except ServiceAccount.DoesNotExist: return redirect('sso.views.profile') - if not acc.active: + # If the account is inactive, or the service doesn't require a password, redirect + if not acc.active or ('require_password' in acc.service.settings and not acc.service.settings['require_password']): return redirect('sso.views.profile') if acc.user == request.user: diff --git a/templates/sso/profile.html b/templates/sso/profile.html index 88c5d58..acdae04 100644 --- a/templates/sso/profile.html +++ b/templates/sso/profile.html @@ -67,7 +67,7 @@ create a login for a service click the Add Service link

{% if acc.active %}Yes{% else %}No{% endif %} {% if acc.active %} - Reset /  + {% if acc.service.settings.require_password %}Reset / {% endif %} Delete {% if acc.service.provide_login %}  / Login