Remove LoginRequiredMixin for ResetPassword view

As this can be done even when the user is logged out
This commit is contained in:
PCoder 2019-02-24 20:35:25 +01:00
parent a20e9479c8
commit c0264e5dda

View file

@ -170,8 +170,7 @@ class ChangeData(LoginRequiredMixin, View):
return render(request, 'error.html', { 'urlname': urlname, 'service': service, 'error': msg } )
class ResetPassword(LoginRequiredMixin, View):
login_url = reverse_lazy('login_index')
class ResetPassword(View):
def get(self, request):
return render(request, 'resetpassword.html')
@ -185,7 +184,7 @@ class ResetPassword(LoginRequiredMixin, View):
uid=user,
attributes=['uid', 'givenName', 'sn', 'mail']
)
if user_exists and request.user.username == user:
if user_exists:
# user exists, so try to get email
# with get_pool().next() as rpc:
# (state, tmp1, tmp2, email) = rpc.getuserdata.get_data(user)