mirror of https://github.com/portainer/portainer
fix(auth/ldap): allow to save internal authentication if custom ldap server is not set [EE-3155] (#7959)
parent
37d4a80769
commit
c8051b68d4
|
@ -34,7 +34,15 @@
|
|||
</label>
|
||||
<div class="col-sm-9 col-lg-10">
|
||||
<div class="mb-3 flex" ng-repeat="url in $ctrl.settings.URLs track by $index">
|
||||
<input type="text" class="form-control" id="ldap_url" ng-model="$ctrl.settings.URLs[$index]" placeholder="e.g. 10.0.0.10:389 or myldap.domain.tld:389" required />
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
id="ldap_url"
|
||||
ng-model="$ctrl.settings.URLs[$index]"
|
||||
placeholder="e.g. 10.0.0.10:389 or myldap.domain.tld:389"
|
||||
ng-model-options="{ allowInvalid: true }"
|
||||
required
|
||||
/>
|
||||
<button ng-if="$index > 0" class="btn btn-sm btn-danger" type="button" ng-click="$ctrl.removeLDAPUrl($index)">
|
||||
<pr-icon icon="'trash-2'" feather="true" size="'md'"></pr-icon>
|
||||
</button>
|
||||
|
|
|
@ -166,6 +166,10 @@ function SettingsAuthenticationController($q, $scope, $state, Notifications, Set
|
|||
}
|
||||
|
||||
settings.URLs = settings.URLs.map((url) => {
|
||||
if (url === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (url.includes(':')) {
|
||||
return url;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue