ports/net-mgmt/netbox/files/patch-netbox_users_views.py
Kai Knoblich a574c718b7 net-mgmt/netbox: Update to 2.6.8
* Backport a patch from upstream that fixes an exception on password change
  page for local users.

Changelog:

Enhancements:
* Disable password change form for LDAP-authenticated users
* Display cable colors on device view
* Remove obsolete P3P policy header
* Add query filters for created and last_updated fields
* Allow the underscore character in IPAddress DNS names

Bug Fixes:
* Fix validation error when editing power cables in bulk
* Fix exception when connecting a cable to a RearPort with no corresponding
  FrontPort
* Include weight field in prefix/VLAN role form
* Include comments on PowerFeed view
* Fix link for assigned ipaddress in interface page
* Prevent exception when importing an invalid cable definition
* Correctly indicate power feed terminations on cable list
* Fix API filtering of interfaces by more than one device name
* Enforce client validation for minimum service port number

https://github.com/netbox-community/netbox/releases/tag/v2.6.8

MFH:		2019Q4
2019-12-11 19:30:22 +00:00

16 lines
668 B
Python

Fix exception on password change page for local users
Obtained from:
https://github.com/netbox-community/netbox/commit/3b03d68ac70be1b5b9912d0a4d2a5fecd25cede4
--- netbox/users/views.py.orig 2019-12-10 15:47:48 UTC
+++ netbox/users/views.py
@@ -96,7 +96,7 @@ class ChangePasswordView(LoginRequiredMixin, View):
def get(self, request):
# LDAP users cannot change their password here
- if getattr(request.user, 'ldap_username'):
+ if getattr(request.user, 'ldap_username', None):
messages.warning(request, "LDAP-authenticated user credentials cannot be changed within NetBox.")
return redirect('user:profile')