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 ca93fef229..f011251daf 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 daa210127c..7ed486c1cc 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 @@ -262,8 +262,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 } } @@ -272,6 +272,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