[pve-devel] [PATCH proxmox-widget-toolkit v2 3/3] fix #4546: utils: Expand authentication data with account expiry date

Philipp Hufnagl p.hufnagl at proxmox.com
Tue Oct 10 12:40:32 CEST 2023


When the authentication data of a session are set, the account expiry
date will be set also (provided there is one).

Signed-off-by: Philipp Hufnagl <p.hufnagl at proxmox.com>
---
 src/Utils.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/Utils.js b/src/Utils.js
index f5769a0..654c907 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -309,6 +309,9 @@ utilities: {
 
     setAuthData: function(data) {
 	Proxmox.UserName = data.username;
+	if (data['account-expiry-date']) {
+	    Proxmox.AccountExpiryDate = data['account-expiry-date'];
+	}
 	Proxmox.LoggedOut = data.LoggedOut;
 	// creates a session cookie (expire = null)
 	// that way the cookie gets deleted after the browser window is closed
-- 
2.39.2






More information about the pve-devel mailing list