How to use the @harbor/ui.USERSTATICPERMISSION.HELM_CHART_VERSION_LABEL function in @harbor/ui

To help you get started, we’ve selected a few @harbor/ui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github goharbor / harbor / src / portal / src / app / project / helm-chart / list-chart-versions / helm-chart-versions-detail / helm-chart-version.component.ts View on Github external
getHelmChartVersionPermission(projectId: number): void {

    let hasAddRemoveHelmChartVersionPermission = this.userPermissionService.getPermission(projectId,
      USERSTATICPERMISSION.HELM_CHART_VERSION_LABEL.KEY, USERSTATICPERMISSION.HELM_CHART_VERSION_LABEL.VALUE.CREATE);
    let hasDownloadHelmChartVersionPermission = this.userPermissionService.getPermission(projectId,
      USERSTATICPERMISSION.HELM_CHART_VERSION.KEY, USERSTATICPERMISSION.HELM_CHART_VERSION.VALUE.READ);
    let hasDeleteHelmChartVersionPermission = this.userPermissionService.getPermission(projectId,
      USERSTATICPERMISSION.HELM_CHART_VERSION.KEY, USERSTATICPERMISSION.HELM_CHART_VERSION.VALUE.DELETE);
    forkJoin(hasAddRemoveHelmChartVersionPermission, hasDownloadHelmChartVersionPermission, hasDeleteHelmChartVersionPermission)
    .subscribe(permissions => {
      this.hasAddRemoveHelmChartVersionPermission = permissions[0] as boolean;
      this.hasDownloadHelmChartVersionPermission = permissions[1] as boolean;
      this.hasDeleteHelmChartVersionPermission = permissions[2] as boolean;
    }, error => this.errorHandler.error(error));
  }
}