mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-30 12:38:17 +01:00
Merge pull request #7435 from pureshine/hidden-vul
Hide vulnrability if clair is not installed
This commit is contained in:
commit
c8e131b024
@ -46,15 +46,15 @@
|
|||||||
</a>
|
</a>
|
||||||
</clr-vertical-nav-group-children>
|
</clr-vertical-nav-group-children>
|
||||||
</clr-vertical-nav-group>
|
</clr-vertical-nav-group>
|
||||||
<clr-vertical-nav-group *ngIf="isSystemAdmin" routerLinkActive="active">
|
<clr-vertical-nav-group *ngIf="isSystemAdmin && (withClair || hasAdminRole)" routerLinkActive="active">
|
||||||
<clr-icon shape="event" clrVerticalNavIcon></clr-icon>
|
<clr-icon shape="event" clrVerticalNavIcon></clr-icon>
|
||||||
{{'SIDE_NAV.TASKS' | translate}}
|
{{'SIDE_NAV.TASKS' | translate}}
|
||||||
<a routerLink="#" hidden aria-hidden="true"></a>
|
<a routerLink="#" hidden aria-hidden="true"></a>
|
||||||
<clr-vertical-nav-group-children *clrIfExpanded="true">
|
<clr-vertical-nav-group-children *clrIfExpanded="true">
|
||||||
<a clrVerticalNavLink routerLink="/harbor/vulnerability" routerLinkActive="active">
|
<a clrVerticalNavLink *ngIf="withClair" routerLink="/harbor/vulnerability" routerLinkActive="active">
|
||||||
{{'SIDE_NAV.SYSTEM_MGMT.VULNERABILITY' | translate}}
|
{{'SIDE_NAV.SYSTEM_MGMT.VULNERABILITY' | translate}}
|
||||||
</a>
|
</a>
|
||||||
<a clrVerticalNavLink routerLink="/harbor/gc" routerLinkActive="active">
|
<a clrVerticalNavLink *ngIf="hasAdminRole" routerLink="/harbor/gc" routerLinkActive="active">
|
||||||
{{'SIDE_NAV.SYSTEM_MGMT.GARBAGE_COLLECTION' | translate}}
|
{{'SIDE_NAV.SYSTEM_MGMT.GARBAGE_COLLECTION' | translate}}
|
||||||
</a>
|
</a>
|
||||||
</clr-vertical-nav-group-children>
|
</clr-vertical-nav-group-children>
|
||||||
|
@ -107,6 +107,15 @@ export class HarborShellComponent implements OnInit, OnDestroy {
|
|||||||
return account != null;
|
return account != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get withClair(): boolean {
|
||||||
|
return this.appConfigService.getConfig().with_clair;
|
||||||
|
}
|
||||||
|
|
||||||
|
public get hasAdminRole(): boolean {
|
||||||
|
return this.session.getCurrentUser() &&
|
||||||
|
this.session.getCurrentUser().has_admin_role;
|
||||||
|
}
|
||||||
|
|
||||||
// Open modal dialog
|
// Open modal dialog
|
||||||
openModal(event: ModalEvent): void {
|
openModal(event: ModalEvent): void {
|
||||||
switch (event.modalName) {
|
switch (event.modalName) {
|
||||||
|
Loading…
Reference in New Issue
Block a user