Remove LoginRequiredMixin for ResetPassword view
As this can be done even when the user is logged out
This commit is contained in:
parent
a20e9479c8
commit
c0264e5dda
1 changed files with 2 additions and 3 deletions
|
@ -170,8 +170,7 @@ class ChangeData(LoginRequiredMixin, View):
|
||||||
return render(request, 'error.html', { 'urlname': urlname, 'service': service, 'error': msg } )
|
return render(request, 'error.html', { 'urlname': urlname, 'service': service, 'error': msg } )
|
||||||
|
|
||||||
|
|
||||||
class ResetPassword(LoginRequiredMixin, View):
|
class ResetPassword(View):
|
||||||
login_url = reverse_lazy('login_index')
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
return render(request, 'resetpassword.html')
|
return render(request, 'resetpassword.html')
|
||||||
|
|
||||||
|
@ -185,7 +184,7 @@ class ResetPassword(LoginRequiredMixin, View):
|
||||||
uid=user,
|
uid=user,
|
||||||
attributes=['uid', 'givenName', 'sn', 'mail']
|
attributes=['uid', 'givenName', 'sn', 'mail']
|
||||||
)
|
)
|
||||||
if user_exists and request.user.username == user:
|
if user_exists:
|
||||||
# user exists, so try to get email
|
# user exists, so try to get email
|
||||||
# with get_pool().next() as rpc:
|
# with get_pool().next() as rpc:
|
||||||
# (state, tmp1, tmp2, email) = rpc.getuserdata.get_data(user)
|
# (state, tmp1, tmp2, email) = rpc.getuserdata.get_data(user)
|
||||||
|
|
Loading…
Reference in a new issue