Remove Operator mode references in Console mode (#884)

Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
This commit is contained in:
Daniel Valdivia
2021-07-22 11:17:26 -07:00
committed by GitHub
parent b79c228890
commit 73fe08cd81
23 changed files with 248 additions and 142 deletions

View File

@@ -36,16 +36,16 @@ func registerSessionHandlers(api *operations.OperatorAPI) {
}
// getSessionResponse parse the token of the current session and returns a list of allowed actions to render in the UI
func getSessionResponse(session *models.Principal) (*models.SessionResponse, *models.Error) {
func getSessionResponse(session *models.Principal) (*models.OperatorSessionResponse, *models.Error) {
// serialize output
if session == nil {
return nil, prepareError(errorGenericInvalidSession)
}
sessionResp := &models.SessionResponse{
sessionResp := &models.OperatorSessionResponse{
Pages: acl.GetAuthorizedEndpoints(session.Actions),
Features: getListOfEnabledFeatures(),
Status: models.SessionResponseStatusOk,
Operator: acl.GetOperatorMode(),
Status: models.OperatorSessionResponseStatusOk,
Operator: true,
}
return sessionResp, nil
}