feat: use get workspace profile in frontend

This commit is contained in:
Steven
2023-09-21 08:46:48 +08:00
parent 58cb5c7e2e
commit 8f17abdbf0
13 changed files with 59 additions and 75 deletions

View File

@ -3,7 +3,7 @@ package v2
import "strings"
var allowedMethodsWhenUnauthorized = map[string]bool{
"/slash.api.v2.WorkspaceSettingService/GetWorkspaceSetting": true,
"/slash.api.v2.WorkspaceService/GetWorkspaceProfile": true,
}
// isUnauthorizeAllowedMethod returns true if the method is allowed to be called when the user is not authorized.
@ -15,9 +15,9 @@ func isUnauthorizeAllowedMethod(methodName string) bool {
}
var allowedMethodsOnlyForAdmin = map[string]bool{
"/slash.api.v2.UserService/CreateUser": true,
"/slash.api.v2.UserService/DeleteUser": true,
"/slash.api.v2.WorkspaceSettingService/UpdateWorkspaceSetting": true,
"/slash.api.v2.UserService/CreateUser": true,
"/slash.api.v2.UserService/DeleteUser": true,
"/slash.api.v2.WorkspaceService/UpdateWorkspaceSetting": true,
}
// isOnlyForAdminAllowedMethod returns true if the method is allowed to be called only by admin.