mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-25 18:08:38 -06:00
#3139: Add a message indicating why the user is redirected
This commit is contained in:
parent
1bc38f66ae
commit
b1761f7856
@ -96,7 +96,8 @@ class ChangePasswordView(LoginRequiredMixin, View):
|
|||||||
|
|
||||||
def get(self, request):
|
def get(self, request):
|
||||||
# LDAP users cannot change their password here
|
# LDAP users cannot change their password here
|
||||||
if getattr(request.user, 'ldap_username', None):
|
if getattr(request.user, 'ldap_username'):
|
||||||
|
messages.warning(request, "LDAP-authenticated user credentials cannot be changed within NetBox.")
|
||||||
return redirect('user:profile')
|
return redirect('user:profile')
|
||||||
|
|
||||||
form = PasswordChangeForm(user=request.user)
|
form = PasswordChangeForm(user=request.user)
|
||||||
|
Loading…
Reference in New Issue
Block a user