[pve-devel] [PATCH manager 02/17] get the api permissions info from /version
Dominik Csapak
d.csapak at proxmox.com
Wed Jul 19 15:45:14 CEST 2017
instead of the /access/ticket api call
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Workspace.js | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 74c67652..fdade908 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -22,10 +22,6 @@ Ext.define('PVE.Workspace', {
PVE.CSRFPreventionToken = loginData.CSRFPreventionToken;
PVE.UserName = loginData.username;
- if (loginData.cap) {
- Ext.state.Manager.set('GuiCap', loginData.cap);
- }
-
// creates a session cookie (expire = null)
// that way the cookie gets deleted after browser window close
Ext.util.Cookies.set('PVEAuthCookie', loginData.ticket, null, '/', null, true);
@@ -154,6 +150,11 @@ Ext.define('PVE.StdWorkspace', {
success: function(response) {
PVE.VersionInfo = response.result.data;
me.updateVersionInfo();
+ var data = response.result.data;
+
+ if (data.cap) {
+ Ext.state.Manager.set('GuiCap', data.cap);
+ }
}
});
}
--
2.11.0
More information about the pve-devel
mailing list