mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Fix Group related issues
1. Fix Ldap group name to required item 2. Edit Group DN is not allowed Signed-off-by: Qian Deng <dengq@vmware.com>
This commit is contained in:
parent
07da2fd5d6
commit
6d91a0d66e
@ -14,6 +14,7 @@
|
||||
[class.invalid]="isDNInvalid">
|
||||
<input type="text" id="ldap_group_dn" name="ldap_group_dn"
|
||||
required
|
||||
[disabled]="mode !== 'create'"
|
||||
[(ngModel)]="group.ldap_group_dn"
|
||||
#groupDN="ngModel">
|
||||
<span class="tooltip-content">
|
||||
@ -26,11 +27,19 @@
|
||||
<label id="type">LDAP</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="group_name">{{'GROUP.NAME' | translate}}</label>
|
||||
<label for="group_name">
|
||||
<label for="group_name" class="required">{{'GROUP.NAME' | translate}}</label>
|
||||
<label for="group_name"
|
||||
aria-haspopup="true"
|
||||
role="tooltip"
|
||||
class="tooltip tooltip-validation tooltip-sm tooltip-right"
|
||||
[class.invalid]="isNameInvalid">
|
||||
<input type="text" id="group_name" name="group_name"
|
||||
required
|
||||
[(ngModel)]="group.group_name"
|
||||
#groupDN="ngModel">
|
||||
#groupName="ngModel">
|
||||
<span class="tooltip-content">
|
||||
{{dnTooltip | translate}}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -45,6 +45,10 @@ export class AddGroupModalComponent implements OnInit, OnDestroy {
|
||||
let dnControl = this.groupForm.controls['ldap_group_dn'];
|
||||
return dnControl && dnControl.invalid && (dnControl.dirty || dnControl.touched);
|
||||
}
|
||||
public get isNameInvalid(): boolean {
|
||||
let dnControl = this.groupForm.controls['group_name'];
|
||||
return dnControl && dnControl.invalid && (dnControl.dirty || dnControl.touched);
|
||||
}
|
||||
|
||||
public get isFormValid(): boolean {
|
||||
return this.groupForm.valid;
|
||||
|
@ -487,7 +487,7 @@
|
||||
"MAINTAINERS": "Maintainers",
|
||||
"PULLS": "Pull Count",
|
||||
"VERSION": "Version",
|
||||
"APP_VERSION": "App Version",
|
||||
"APP_VERSION": "Application Version",
|
||||
"INSTALL": "Install",
|
||||
"INSTALL_CHART": "Install Chart",
|
||||
"NAME": "Name",
|
||||
|
@ -486,7 +486,7 @@
|
||||
"MAINTAINERS": "Maintainers",
|
||||
"PULLS": "Pull Count",
|
||||
"VERSION": "Version",
|
||||
"APP_VERSION": "App Version",
|
||||
"APP_VERSION": "Application Version",
|
||||
"INSTALL": "Install",
|
||||
"INSTALL_CHART": "Install Chart",
|
||||
"NAME": "Name",
|
||||
|
@ -462,7 +462,7 @@
|
||||
"MAINTAINERS": "Maintainers",
|
||||
"PULLS": "Pull Count",
|
||||
"VERSION": "Version",
|
||||
"APP_VERSION": "App Version",
|
||||
"APP_VERSION": "Application Version",
|
||||
"INSTALL": "Install",
|
||||
"INSTALL_CHART": "Install Chart",
|
||||
"NAME": "Name",
|
||||
|
Loading…
Reference in New Issue
Block a user