1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

822 bulk import of device components (#3711)

Closes #822: CSV import for device components

* Implement CSV import for netbox-community#822

* Comment out default_return_url until there is a proper target

* Fix the default value of `enabled` when not included in the import

* rear_port is definitely required here

* Power Ports don't have a type (yet)

* Add import for console-ports and console-server-ports

* Add import for device-bays
This commit is contained in:
Sander Steffann
2019-12-05 21:36:11 +01:00
committed by Jeremy Stretch
parent f3a41df395
commit adb25fd7d7
23 changed files with 523 additions and 41 deletions

View File

@@ -95,6 +95,11 @@ class ChangePasswordView(LoginRequiredMixin, View):
template_name = 'users/change_password.html'
def get(self, request):
# LDAP users cannot change their password here
if getattr(request.user, 'ldap_username'):
messages.warning(request, "LDAP-authenticated user credentials cannot be changed within NetBox.")
return redirect('user:profile')
form = PasswordChangeForm(user=request.user)
return render(request, self.template_name, {