diff --git a/src/portal/lib/src/config/config.ts b/src/portal/lib/src/config/config.ts index 7d11b5d0a..5d4893fcc 100644 --- a/src/portal/lib/src/config/config.ts +++ b/src/portal/lib/src/config/config.ts @@ -101,6 +101,7 @@ export class Configuration { count_per_project: NumberValueItem; storage_per_project: NumberValueItem; cfg_expiration: NumberValueItem; + oidc_groups_claim: StringValueItem; public constructor() { this.auth_mode = new StringValueItem("db_auth", true); this.project_creation_restriction = new StringValueItem("everyone", true); @@ -153,6 +154,7 @@ export class Configuration { this.oidc_client_secret = new StringValueItem('', true); this.oidc_verify_cert = new BoolValueItem(false, true); this.oidc_scope = new StringValueItem('', true); + this.oidc_groups_claim = new StringValueItem('', true); this.count_per_project = new NumberValueItem(-1, true); this.storage_per_project = new NumberValueItem(-1, true); } diff --git a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.scss b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.scss index 49f76c1c1..42330084e 100644 --- a/src/portal/lib/src/config/vulnerability/vulnerability-config.component.scss +++ b/src/portal/lib/src/config/vulnerability/vulnerability-config.component.scss @@ -47,4 +47,5 @@ color: #000; font-size: .541667rem; width: 200px; + padding-right: 1rem; } \ No newline at end of file diff --git a/src/portal/lib/src/shared/shared.const.ts b/src/portal/lib/src/shared/shared.const.ts index ff1935071..8e76581d9 100644 --- a/src/portal/lib/src/shared/shared.const.ts +++ b/src/portal/lib/src/shared/shared.const.ts @@ -150,6 +150,7 @@ export const PROJECT_ROOTS = [ export enum GroupType { LDAP_TYPE = 1, - HTTP_TYPE = 2 + HTTP_TYPE = 2, + OIDC_TYPE = 3 } export const REFRESH_TIME_DIFFERENCE = 10000; diff --git a/src/portal/src/app/app-config.service.ts b/src/portal/src/app/app-config.service.ts index 7ee3639aa..c6d38d97d 100644 --- a/src/portal/src/app/app-config.service.ts +++ b/src/portal/src/app/app-config.service.ts @@ -72,6 +72,9 @@ export class AppConfigService { public isHttpAuthMode(): boolean { return this.configurations && this.configurations.auth_mode === CONFIG_AUTH_MODE.HTTP_AUTH; } + public isOidcMode(): boolean { + return this.configurations && this.configurations.auth_mode === CONFIG_AUTH_MODE.OIDC_AUTH; + } // Return the reconstructed admiral url public getAdmiralEndpoint(currentHref: string): string { diff --git a/src/portal/src/app/base/harbor-shell/harbor-shell.component.html b/src/portal/src/app/base/harbor-shell/harbor-shell.component.html index f7a085a63..15fe8bdb5 100644 --- a/src/portal/src/app/base/harbor-shell/harbor-shell.component.html +++ b/src/portal/src/app/base/harbor-shell/harbor-shell.component.html @@ -29,7 +29,7 @@ {{'SIDE_NAV.SYSTEM_MGMT.USER' | translate}} - + {{'SIDE_NAV.SYSTEM_MGMT.GROUP' | translate}} diff --git a/src/portal/src/app/base/harbor-shell/harbor-shell.component.ts b/src/portal/src/app/base/harbor-shell/harbor-shell.component.ts index 0715b7e2d..9def926e0 100644 --- a/src/portal/src/app/base/harbor-shell/harbor-shell.component.ts +++ b/src/portal/src/app/base/harbor-shell/harbor-shell.component.ts @@ -55,6 +55,7 @@ export class HarborShellComponent implements OnInit, OnDestroy { searchSub: Subscription; searchCloseSub: Subscription; isLdapMode: boolean; + isOidcMode: boolean; isHttpAuthMode: boolean; constructor( @@ -69,6 +70,8 @@ export class HarborShellComponent implements OnInit, OnDestroy { this.isLdapMode = true; } else if (this.appConfigService.isHttpAuthMode()) { this.isHttpAuthMode = true; + } else if (this.appConfigService.isOidcMode()) { + this.isOidcMode = true; } this.searchSub = this.searchTrigger.searchTriggerChan$.subscribe(searchEvt => { if (searchEvt && searchEvt.trim() !== "") { diff --git a/src/portal/src/app/config/auth/config-auth.component.html b/src/portal/src/app/config/auth/config-auth.component.html index 21ed30a89..cc3737154 100644 --- a/src/portal/src/app/config/auth/config-auth.component.html +++ b/src/portal/src/app/config/auth/config-auth.component.html @@ -1,24 +1,28 @@
- -