diff --git a/knox-token-management-ui/token-management/app/token.management.component.html b/knox-token-management-ui/token-management/app/token.management.component.html index 5bf0e7de65..b2b6c157b0 100644 --- a/knox-token-management-ui/token-management/app/token.management.component.html +++ b/knox-token-management-ui/token-management/app/token.management.component.html @@ -137,5 +137,16 @@ + +
+ Expired tokens cannot be disabled in batches (nor individually). +
+
+ Expired tokens cannot be enabed in batches (nor individually). +
+
+ KnoxSSO Cookies cannot be revoked in batches (nor individually). +
+ diff --git a/knox-token-management-ui/token-management/app/token.management.component.ts b/knox-token-management-ui/token-management/app/token.management.component.ts index 7efa44f6a2..ee24191014 100644 --- a/knox-token-management-ui/token-management/app/token.management.component.ts +++ b/knox-token-management-ui/token-management/app/token.management.component.ts @@ -260,8 +260,8 @@ export class TokenManagementComponent implements OnInit { this.showEnableSelectedTokensButton = false; this.showRevokeSelectedTokensButton = false; } else { - this.showDisableSelectedTokensButton = true; - this.showEnableSelectedTokensButton = true; + this.showDisableSelectedTokensButton = this.selectionHasZeroExpiredToken(); // expired tokens must not be disabled + this.showEnableSelectedTokensButton = this.selectionHasZeroExpiredToken(); // expired tokens must not be enabled this.showRevokeSelectedTokensButton = this.selectionHasZeroKnoxSsoCookie(); // KnoxSSO cookies must not be revoked } } @@ -270,6 +270,10 @@ export class TokenManagementComponent implements OnInit { return this.selection.selected.every(token => !token.metadata.knoxSsoCookie); } + private selectionHasZeroExpiredToken(): boolean { + return this.selection.selected.every(token => !this.isTokenExpired(token.expirationLong)); + } + getFontWeight(token: KnoxToken): string { return this.isCurrentKnoxSsoCookietoken(token) ? 'bold' : 'normal'; } diff --git a/knox-token-management-ui/token-management/assets/yellow_tip.png b/knox-token-management-ui/token-management/assets/yellow_tip.png new file mode 100644 index 0000000000..7b2397f6e3 Binary files /dev/null and b/knox-token-management-ui/token-management/assets/yellow_tip.png differ