diff --git a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/user/detail/user.detail.component.html b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/user/detail/user.detail.component.html index d3225afa0..fb9a1b7c2 100644 --- a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/user/detail/user.detail.component.html +++ b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/components/user/detail/user.detail.component.html @@ -83,12 +83,18 @@

{{$ctrl.user.name.formatted}}

- + Signed AUP - + + AUP expiration + + {{$ctrl.user.aupSignature.signatureTime | relativeDate }} + + {{$ctrl.user.aupSignatureExpiryDate | relativeDate }} + No AUP signature found diff --git a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/services/user.service.js b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/services/user.service.js index d2ba9cfe6..223cf2f0b 100644 --- a/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/services/user.service.js +++ b/iam-login-service/src/main/webapp/resources/iam/apps/dashboard-app/services/user.service.js @@ -44,6 +44,10 @@ function UserService($q, $rootScope, scimFactory, Authorities, Utils, AupService var user = result[0]; if (result[1] !== null) { user.aupSignature = result[1].data; + if (user.aupSignature.aup.signatureValidityInDays != 0){ + user.aupSignatureExpiryDate = new Date(new Date(user.aupSignature.signatureTime).getTime() + + user.aupSignature.aup.signatureValidityInDays * 24 * 60 * 60 * 1000); + } } else { user.aupSignature = null; } @@ -63,6 +67,10 @@ function UserService($q, $rootScope, scimFactory, Authorities, Utils, AupService user.authorities = result[1].data.authorities; if (result[2] !== null) { user.aupSignature = result[2].data; + if (user.aupSignature.aup.signatureValidityInDays != 0){ + user.aupSignatureExpiryDate = new Date(new Date(user.aupSignature.signatureTime).getTime() + + user.aupSignature.aup.signatureValidityInDays * 24 * 60 * 60 * 1000); + } } else { user.aupSignature = null; }