fix(ldap): enable user/group setting in custom ldap (#5855)

snyk-fix-234920d529b1716a428f2b20a3048d37
Chaim Lev-Ari 3 years ago committed by GitHub
parent dad762de9f
commit ed89587cb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -16,17 +16,7 @@
<portainer-tooltip position="bottom" message="The distinguished name of the element from which the LDAP server will search for groups."></portainer-tooltip>
</label>
<div class="col-sm-8 col-md-4">
<input
type="text"
class="form-control"
id="ldap_group_basedn_{{ $index }}"
ng-model="config.GroupBaseDN"
placeholder="dc=ldap,dc=domain,dc=tld"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-class="limited-be no-border"
limited-feature-disabled
limited-feature-tabindex="-1"
/>
<input type="text" class="form-control" id="ldap_group_basedn_{{ $index }}" ng-model="config.GroupBaseDN" placeholder="dc=ldap,dc=domain,dc=tld" />
</div>
<label for="ldap_group_att_{{ $index }}" class="col-sm-4 col-md-2 control-label text-left">
@ -34,17 +24,7 @@
<portainer-tooltip position="bottom" message="LDAP attribute which denotes the group membership."></portainer-tooltip>
</label>
<div class="col-sm-8 col-md-4">
<input
type="text"
class="form-control"
id="ldap_group_att_{{ $index }}"
ng-model="config.GroupAttribute"
placeholder="member"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-class="limited-be no-border"
limited-feature-disabled
limited-feature-tabindex="-1"
/>
<input type="text" class="form-control" id="ldap_group_att_{{ $index }}" ng-model="config.GroupAttribute" placeholder="member" />
</div>
</div>
<div class="form-group">
@ -53,27 +33,10 @@
<portainer-tooltip position="bottom" message="The LDAP search filter used to select group elements, optional."></portainer-tooltip>
</label>
<div ng-class="{ 'col-sm-7 col-md-9': $index, 'col-sm-8 col-md-10': !$index }">
<input
type="text"
class="form-control"
id="ldap_group_filter_{{ $index }}"
ng-model="config.GroupFilter"
placeholder="(objectClass=account)"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-class="limited-be no-border"
limited-feature-disabled
limited-feature-tabindex="-1"
/>
<input type="text" class="form-control" id="ldap_group_filter_{{ $index }}" ng-model="config.GroupFilter" placeholder="(objectClass=account)" />
</div>
<div class="col-sm-1" ng-if="$index > 0">
<button
class="btn btn-sm btn-danger"
type="button"
ng-click="$ctrl.onRemoveClick($index)"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-disabled
limited-feature-tabindex="-1"
>
<button class="btn btn-sm btn-danger" type="button" ng-click="$ctrl.onRemoveClick($index)">
<i class="fa fa-trash" aria-hidden="true"></i>
</button>
</div>
@ -83,14 +46,7 @@
<div class="form-group" style="margin-top: 10px;">
<div class="col-sm-12">
<button
class="label label-default interactive"
style="border: 0;"
ng-click="$ctrl.onAddClick()"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-tabindex="-1"
limited-feature-disabled
>
<button class="label label-default interactive" style="border: 0;" ng-click="$ctrl.onAddClick()">
<i class="fa fa-plus-circle" aria-hidden="true"></i> add group search configuration
</button>
</div>

@ -16,17 +16,7 @@
<portainer-tooltip position="bottom" message="The distinguished name of the element from which the LDAP server will search for users."></portainer-tooltip>
</label>
<div class="col-sm-8 col-md-4">
<input
type="text"
class="form-control"
id="ldap_basedn_{{ $index }}"
ng-model="config.BaseDN"
placeholder="dc=ldap,dc=domain,dc=tld"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-class="limited-be no-border"
limited-feature-tabindex="-1"
limited-feature-disabled
/>
<input type="text" class="form-control" id="ldap_basedn_{{ $index }}" ng-model="config.BaseDN" placeholder="dc=ldap,dc=domain,dc=tld" />
</div>
<label for="ldap_username_att_{{ $index }}" class="col-sm-4 col-md-3 col-lg-2 control-label text-left">
@ -34,17 +24,7 @@
<portainer-tooltip position="bottom" message="LDAP attribute which denotes the username."></portainer-tooltip>
</label>
<div class="col-sm-8 col-md-3 col-lg-4">
<input
type="text"
class="form-control"
id="ldap_username_att_{{ $index }}"
ng-model="config.UserNameAttribute"
placeholder="uid"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-class="limited-be no-border"
limited-feature-tabindex="-1"
limited-feature-disabled
/>
<input type="text" class="form-control" id="ldap_username_att_{{ $index }}" ng-model="config.UserNameAttribute" placeholder="uid" />
</div>
</div>
<div class="form-group">
@ -53,27 +33,10 @@
<portainer-tooltip position="bottom" message="The LDAP search filter used to select user elements, optional."></portainer-tooltip>
</label>
<div ng-class="{ 'col-sm-7 col-md-9': $index, 'col-sm-8 col-md-10': !$index }">
<input
type="text"
class="form-control"
id="ldap_filter_{{ $index }}"
ng-model="config.Filter"
placeholder="(objectClass=account)"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-class="limited-be no-border"
limited-feature-tabindex="-1"
limited-feature-disabled
/>
<input type="text" class="form-control" id="ldap_filter_{{ $index }}" ng-model="config.Filter" placeholder="(objectClass=account)" />
</div>
<div class="col-sm-1" ng-if="$index > 0">
<button
class="btn btn-sm btn-danger"
type="button"
ng-click="$ctrl.onRemoveClick($index)"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-tabindex="-1"
limited-feature-disabled
>
<button class="btn btn-sm btn-danger" type="button" ng-click="$ctrl.onRemoveClick($index)">
<i class="fa fa-trash" aria-hidden="true"></i>
</button>
</div>
@ -83,14 +46,7 @@
<div class="form-group" style="margin-top: 10px;">
<div class="col-sm-12">
<button
class="label label-default interactive"
style="border: 0;"
ng-click="$ctrl.onAddClick()"
limited-feature-dir="{{ $ctrl.limitedFeatureId }}"
limited-feature-tabindex="-1"
limited-feature-disabled
>
<button class="label label-default interactive" style="border: 0;" ng-click="$ctrl.onAddClick()">
<i class="fa fa-plus-circle" aria-hidden="true"></i> add user search configuration
</button>
</div>

Loading…
Cancel
Save