Added initial AWS Marketplace support to operator console (#1347)
* Added initial AWS Marketplace support to operator console Signed-off-by: Benjamin Perez <benjamin@bexsoft.net> * Renamed interface * Removed resources request in tenant request. * Destructured map state in Tenant Size * Resource Validations Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Removed ecparity set default option Co-authored-by: Benjamin Perez <benjamin@bexsoft.net> Co-authored-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
@@ -17,6 +17,8 @@
|
||||
package operatorapi
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/go-openapi/runtime/middleware"
|
||||
"github.com/minio/console/models"
|
||||
"github.com/minio/console/operatorapi/operations"
|
||||
@@ -44,6 +46,19 @@ func getSessionResponse(session *models.Principal) (*models.OperatorSessionRespo
|
||||
Status: models.OperatorSessionResponseStatusOk,
|
||||
Operator: true,
|
||||
Permissions: map[string][]string{},
|
||||
Features: getListOfOperatorFeatures(),
|
||||
}
|
||||
return sessionResp, nil
|
||||
}
|
||||
|
||||
// getListOfEnabledFeatures returns a list of features
|
||||
func getListOfOperatorFeatures() []string {
|
||||
features := []string{}
|
||||
mpEnabled := getMPMode()
|
||||
|
||||
if mpEnabled != "" {
|
||||
features = append(features, fmt.Sprintf("mp-mode-%s", mpEnabled))
|
||||
}
|
||||
|
||||
return features
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user