mirror of
https://github.com/goharbor/harbor
synced 2025-04-18 21:30:32 +00: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">
|
[class.invalid]="isDNInvalid">
|
||||||
<input type="text" id="ldap_group_dn" name="ldap_group_dn"
|
<input type="text" id="ldap_group_dn" name="ldap_group_dn"
|
||||||
required
|
required
|
||||||
|
[disabled]="mode !== 'create'"
|
||||||
[(ngModel)]="group.ldap_group_dn"
|
[(ngModel)]="group.ldap_group_dn"
|
||||||
#groupDN="ngModel">
|
#groupDN="ngModel">
|
||||||
<span class="tooltip-content">
|
<span class="tooltip-content">
|
||||||
|
@ -26,11 +27,19 @@
|
||||||
<label id="type">LDAP</label>
|
<label id="type">LDAP</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="group_name">{{'GROUP.NAME' | translate}}</label>
|
<label for="group_name" class="required">{{'GROUP.NAME' | translate}}</label>
|
||||||
<label for="group_name">
|
<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"
|
<input type="text" id="group_name" name="group_name"
|
||||||
|
required
|
||||||
[(ngModel)]="group.group_name"
|
[(ngModel)]="group.group_name"
|
||||||
#groupDN="ngModel">
|
#groupName="ngModel">
|
||||||
|
<span class="tooltip-content">
|
||||||
|
{{dnTooltip | translate}}
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -45,6 +45,10 @@ export class AddGroupModalComponent implements OnInit, OnDestroy {
|
||||||
let dnControl = this.groupForm.controls['ldap_group_dn'];
|
let dnControl = this.groupForm.controls['ldap_group_dn'];
|
||||||
return dnControl && dnControl.invalid && (dnControl.dirty || dnControl.touched);
|
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 {
|
public get isFormValid(): boolean {
|
||||||
return this.groupForm.valid;
|
return this.groupForm.valid;
|
||||||
|
|
|
@ -487,7 +487,7 @@
|
||||||
"MAINTAINERS": "Maintainers",
|
"MAINTAINERS": "Maintainers",
|
||||||
"PULLS": "Pull Count",
|
"PULLS": "Pull Count",
|
||||||
"VERSION": "Version",
|
"VERSION": "Version",
|
||||||
"APP_VERSION": "App Version",
|
"APP_VERSION": "Application Version",
|
||||||
"INSTALL": "Install",
|
"INSTALL": "Install",
|
||||||
"INSTALL_CHART": "Install Chart",
|
"INSTALL_CHART": "Install Chart",
|
||||||
"NAME": "Name",
|
"NAME": "Name",
|
||||||
|
|
|
@ -486,7 +486,7 @@
|
||||||
"MAINTAINERS": "Maintainers",
|
"MAINTAINERS": "Maintainers",
|
||||||
"PULLS": "Pull Count",
|
"PULLS": "Pull Count",
|
||||||
"VERSION": "Version",
|
"VERSION": "Version",
|
||||||
"APP_VERSION": "App Version",
|
"APP_VERSION": "Application Version",
|
||||||
"INSTALL": "Install",
|
"INSTALL": "Install",
|
||||||
"INSTALL_CHART": "Install Chart",
|
"INSTALL_CHART": "Install Chart",
|
||||||
"NAME": "Name",
|
"NAME": "Name",
|
||||||
|
|
|
@ -462,7 +462,7 @@
|
||||||
"MAINTAINERS": "Maintainers",
|
"MAINTAINERS": "Maintainers",
|
||||||
"PULLS": "Pull Count",
|
"PULLS": "Pull Count",
|
||||||
"VERSION": "Version",
|
"VERSION": "Version",
|
||||||
"APP_VERSION": "App Version",
|
"APP_VERSION": "Application Version",
|
||||||
"INSTALL": "Install",
|
"INSTALL": "Install",
|
||||||
"INSTALL_CHART": "Install Chart",
|
"INSTALL_CHART": "Install Chart",
|
||||||
"NAME": "Name",
|
"NAME": "Name",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user