Add ldap admin DN

Problem description:
currently, harbor does not support config ldap admin DN

Enhancement:
Add ldap admin dn in configuration as a optional config.
This commit is contained in:
Mia ZHOU 2018-07-31 16:15:57 +08:00
parent 3c0bd20d7e
commit 67beabb364
7 changed files with 36 additions and 18 deletions

View File

@ -137,12 +137,9 @@
</clr-checkbox> </clr-checkbox>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="ldapGroupBaseDN" class="required">{{'CONFIG.LDAP.LDAP_GROUP_BASE_DN' | translate}}</label> <label for="ldapGroupBaseDN">{{'CONFIG.LDAP.LDAP_GROUP_BASE_DN' | translate}}</label>
<label for="ldapGroupBaseDN" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-lg tooltip-top-right"> <input name="ldapGroupBaseDN" class="padding-right-28" type="text" #ldapGroupDNInput="ngModel" [(ngModel)]="currentConfig.ldap_group_base_dn.value"
<input name="ldapGroupBaseDN" type="text" #ldapGroupDNInput="ngModel" [(ngModel)]="currentConfig.ldap_group_base_dn.value" id="ldapGroupBaseDN" size="40" [disabled]="disabled(currentConfig.ldap_group_base_dn)">
id="ldapGroupBaseDN" size="40" [disabled]="disabled(currentConfig.ldap_group_base_dn)">
<span class="tooltip-content"> {{'TOOLTIP.ITEM_REQUIRED' | translate}} </span>
</label>
<clr-tooltip> <clr-tooltip>
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon> <clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen> <clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
@ -151,12 +148,9 @@
</clr-tooltip> </clr-tooltip>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="ldapGroupFilter" class="required">{{'CONFIG.LDAP.LDAP_GROUP_FILTER' | translate}}</label> <label for="ldapGroupFilter">{{'CONFIG.LDAP.LDAP_GROUP_FILTER' | translate}}</label>
<label for="ldapGroupFilter" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-lg tooltip-top-right"> <input name="ldapGroupFilter" type="text" class="padding-right-28" #ldapGroupFilterInput="ngModel" [(ngModel)]="currentConfig.ldap_group_search_filter.value"
<input name="ldapGroupFilter" type="text" #ldapGroupFilterInput="ngModel" [(ngModel)]="currentConfig.ldap_group_search_filter.value" id="ldapGroupFilter" size="40" [disabled]="disabled(currentConfig.ldap_group_search_filter)">
id="ldapGroupFilter" size="40" [disabled]="disabled(currentConfig.ldap_group_search_filter)">
<span class="tooltip-content"> {{'TOOLTIP.ITEM_REQUIRED' | translate}} </span>
</label>
<clr-tooltip> <clr-tooltip>
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon> <clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen> <clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
@ -165,12 +159,9 @@
</clr-tooltip> </clr-tooltip>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="ldapGroupGID" class="required">{{'CONFIG.LDAP.LDAP_GROUP_GID' | translate}}</label> <label for="ldapGroupGID">{{'CONFIG.LDAP.LDAP_GROUP_GID' | translate}}</label>
<label for="ldapGroupGID" aria-haspopup="true" role="tooltip" class="tooltip tooltip-validation tooltip-lg tooltip-top-right"> <input name="ldapGroupGID" class="padding-right-28" type="text" #ldapGroupDNInput="ngModel" [(ngModel)]="currentConfig.ldap_group_attribute_name.value"
<input name="ldapGroupGID" type="text" #ldapGroupDNInput="ngModel" [(ngModel)]="currentConfig.ldap_group_attribute_name.value" id="ldapGroupGID" size="40" [disabled]="disabled(currentConfig.ldap_group_attribute_name)">
id="ldapGroupGID" size="40" [disabled]="disabled(currentConfig.ldap_group_attribute_name)">
<span class="tooltip-content"> {{'TOOLTIP.ITEM_REQUIRED' | translate}} </span>
</label>
<clr-tooltip> <clr-tooltip>
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon> <clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen> <clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
@ -178,6 +169,19 @@
</clr-tooltip-content> </clr-tooltip-content>
</clr-tooltip> </clr-tooltip>
</div> </div>
<!-- This is for ldap group admin dn -->
<div class="form-group">
<label>{{'CONFIG.LDAP.LDAP_GROUP_ADMIN_DN' | translate}}</label>
<input name="ldapGroupAdminDN" class="padding-right-28" type="text" #ldapGroupFilterInput="ngModel" [(ngModel)]="currentConfig.ldap_group_admin_dn.value"
id="ldapGroupAdminDN" size="40" [disabled]="disabled(currentConfig.ldap_group_admin_dn)">
<clr-tooltip>
<clr-icon clrTooltipTrigger shape="info-circle" size="24"></clr-icon>
<clr-tooltip-content clrPosition="top-right" clrSize="lg" *clrIfOpen>
<span>{{'CONFIG.LDAP.LDAP_GROUP_ADMIN_DN_INFO' | translate}}</span>
</clr-tooltip-content>
</clr-tooltip>
</div>
<!-- End of ldap group admin dn -->
<div class="form-group"> <div class="form-group">
<label for="ldapGroupScope">{{'CONFIG.LDAP.GROUP_SCOPE' | translate}}</label> <label for="ldapGroupScope">{{'CONFIG.LDAP.GROUP_SCOPE' | translate}}</label>
<div class="select"> <div class="select">
@ -194,6 +198,7 @@
</clr-tooltip-content> </clr-tooltip-content>
</clr-tooltip> </clr-tooltip>
</div> </div>
</section> </section>
<section class="form-block"> <section class="form-block">
<div class="form-group"> <div class="form-group">

View File

@ -1,3 +1,7 @@
clr-tooltip { clr-tooltip {
top: -1px; top: -1px;
}
.padding-right-28 {
padding-right:28px;
} }

View File

@ -553,6 +553,8 @@
"LDAP_GROUP_FILTER_INFO": "The filter of your LDAP group", "LDAP_GROUP_FILTER_INFO": "The filter of your LDAP group",
"LDAP_GROUP_GID": "LDAP Group GID", "LDAP_GROUP_GID": "LDAP Group GID",
"LDAP_GROUP_GID_INFO": "The Group gid of your LDAP group", "LDAP_GROUP_GID_INFO": "The Group gid of your LDAP group",
"LDAP_GROUP_ADMIN_DN": "LDAP Group Admin DN",
"LDAP_GROUP_ADMIN_DN_INFO": "The Admin DN of your LDAP group",
"GROUP_SCOPE": "LDAP Group Scope", "GROUP_SCOPE": "LDAP Group Scope",
"GROUP_SCOPE_INFO": "The scope of your LDAP Group" "GROUP_SCOPE_INFO": "The scope of your LDAP Group"

View File

@ -553,6 +553,8 @@
"LDAP_GROUP_FILTER_INFO": "The filter of your LDAP group", "LDAP_GROUP_FILTER_INFO": "The filter of your LDAP group",
"LDAP_GROUP_GID": "LDAP Group GID", "LDAP_GROUP_GID": "LDAP Group GID",
"LDAP_GROUP_GID_INFO": "The Group gid of your LDAP group", "LDAP_GROUP_GID_INFO": "The Group gid of your LDAP group",
"LDAP_GROUP_ADMIN_DN": "LDAP Group Admin DN",
"LDAP_GROUP_ADMIN_DN_INFO": "The Admin DN of your LDAP group",
"GROUP_SCOPE": "LDAP Group Scope", "GROUP_SCOPE": "LDAP Group Scope",
"GROUP_SCOPE_INFO": "The scope of your LDAP Group" "GROUP_SCOPE_INFO": "The scope of your LDAP Group"
}, },

View File

@ -524,6 +524,8 @@
"LDAP_GROUP_FILTER_INFO": "The filter of your LDAP group", "LDAP_GROUP_FILTER_INFO": "The filter of your LDAP group",
"LDAP_GROUP_GID": "LDAP Group GID", "LDAP_GROUP_GID": "LDAP Group GID",
"LDAP_GROUP_GID_INFO": "The Group gid of your LDAP group", "LDAP_GROUP_GID_INFO": "The Group gid of your LDAP group",
"LDAP_GROUP_ADMIN_DN": "LDAP Group Admin DN",
"LDAP_GROUP_ADMIN_DN_INFO": "The Admin DN of your LDAP group",
"GROUP_SCOPE": "LDAP Group Scope", "GROUP_SCOPE": "LDAP Group Scope",
"GROUP_SCOPE_INFO": "The scope of your LDAP Group" "GROUP_SCOPE_INFO": "The scope of your LDAP Group"
}, },

View File

@ -553,6 +553,8 @@
"LDAP_GROUP_FILTER_INFO": "LDAP组的过滤器", "LDAP_GROUP_FILTER_INFO": "LDAP组的过滤器",
"LDAP_GROUP_GID": "LDAP组GID", "LDAP_GROUP_GID": "LDAP组GID",
"LDAP_GROUP_GID_INFO": "LDAP组的GID", "LDAP_GROUP_GID_INFO": "LDAP组的GID",
"LDAP_GROUP_ADMIN_DN": "LDAP组管理员DN",
"LDAP_GROUP_ADMIN_DN_INFO": "LDAP组管理员DN",
"GROUP_SCOPE": "LDAP组搜索范围", "GROUP_SCOPE": "LDAP组搜索范围",
"GROUP_SCOPE_INFO": "搜索范围" "GROUP_SCOPE_INFO": "搜索范围"
}, },

View File

@ -8,6 +8,7 @@ body {
left: 0; left: 0;
right:0; right:0;
bottom:0; bottom:0;
margin:auto;
width: 108px !important; width: 108px !important;
height: 108px !important; height: 108px !important;
} }