mirror of
https://github.com/versity/versitygw.git
synced 2026-09-20 06:54:47 +00:00
feat: remove /api/gateways webserver endpoint
Refactor webui so that we have a template, webui/web/js/config.js.tmpl, instead of the /api/gateways to retrieve the gateways listing. This also restructures the css theme into separate common files for easier maintenance.
This commit is contained in:
@@ -291,15 +291,6 @@ class VersityAPI {
|
||||
// User Context Methods (ROOT user detection)
|
||||
// ============================================
|
||||
|
||||
/**
|
||||
* Detect ROOT user and get accessible gateways
|
||||
* Calls /api/detect-root endpoint to check if credentials match ROOT config
|
||||
* @param {string} accessKey - Access key to check
|
||||
* @param {string} secretKey - Secret key to check
|
||||
* @returns {Object} - { userType: 'root'|'user', matchingGateways: [...] }
|
||||
*/
|
||||
// detectRootUser removed - single gateway mode
|
||||
|
||||
/**
|
||||
* Store user type and accessible gateways in session
|
||||
* @param {string} userType - 'root' | 'admin' | 'user'
|
||||
@@ -318,26 +309,6 @@ class VersityAPI {
|
||||
this._userType = sessionStorage.getItem('vgw_user_type') || 'user';
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if current user is ROOT user (has ROOT credentials matching gateway configs)
|
||||
* @returns {boolean}
|
||||
*/
|
||||
// isRootUser removed
|
||||
|
||||
/**
|
||||
* Get list of gateways accessible to current user
|
||||
* Only populated for ROOT users
|
||||
* @returns {Array} - Array of { name, port, endpoint, region, status }
|
||||
*/
|
||||
// getAccessibleGateways removed
|
||||
|
||||
/**
|
||||
* Check if authenticated
|
||||
*/
|
||||
isAuthenticated() {
|
||||
return this.credentials !== null && this.s3Endpoint !== null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user has admin privileges
|
||||
*/
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
window.__VGWCONFIG__ = {{.ConfigJSON}};
|
||||
Reference in New Issue
Block a user