@@ -77,7 +77,7 @@ func CreateUser(req *restful.Request, resp *restful.Response) {
|
||||
}
|
||||
|
||||
func DeleteUser(req *restful.Request, resp *restful.Response) {
|
||||
username := req.PathParameter("name")
|
||||
username := req.PathParameter("username")
|
||||
|
||||
operator := req.HeaderParameter(constants.UserNameHeader)
|
||||
|
||||
@@ -98,7 +98,7 @@ func DeleteUser(req *restful.Request, resp *restful.Response) {
|
||||
|
||||
func UpdateUser(req *restful.Request, resp *restful.Response) {
|
||||
|
||||
usernameInPath := req.PathParameter("name")
|
||||
usernameInPath := req.PathParameter("username")
|
||||
usernameInHeader := req.HeaderParameter(constants.UserNameHeader)
|
||||
var user models.User
|
||||
|
||||
@@ -162,7 +162,7 @@ func isUserManager(username string) (bool, error) {
|
||||
}
|
||||
|
||||
func UserLoginLog(req *restful.Request, resp *restful.Response) {
|
||||
username := req.PathParameter("name")
|
||||
username := req.PathParameter("username")
|
||||
logs, err := iam.LoginLog(username)
|
||||
|
||||
if err != nil {
|
||||
|
||||
@@ -26,6 +26,10 @@ import (
|
||||
"kubesphere.io/kubesphere/pkg/params"
|
||||
)
|
||||
|
||||
func ListNamespacedResources(req *restful.Request, resp *restful.Response) {
|
||||
ListResources(req, resp)
|
||||
}
|
||||
|
||||
func ListResources(req *restful.Request, resp *restful.Response) {
|
||||
namespace := req.PathParameter("namespace")
|
||||
resourceName := req.PathParameter("resources")
|
||||
|
||||
@@ -101,6 +101,9 @@ func DescribeWorkspace(req *restful.Request, resp *restful.Response) {
|
||||
|
||||
resp.WriteAsJson(result)
|
||||
}
|
||||
func ListNamespacesByUsername(req *restful.Request, resp *restful.Response) {
|
||||
ListNamespaces(req, resp)
|
||||
}
|
||||
|
||||
func ListNamespaces(req *restful.Request, resp *restful.Response) {
|
||||
workspace := req.PathParameter("workspace")
|
||||
@@ -208,6 +211,10 @@ func checkResourceQuotas(wokrspace *v1alpha1.Workspace) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func ListDevopsProjectsByUsername(req *restful.Request, resp *restful.Response) {
|
||||
ListDevopsProjects(req, resp)
|
||||
}
|
||||
|
||||
func ListDevopsProjects(req *restful.Request, resp *restful.Response) {
|
||||
|
||||
workspace := req.PathParameter("workspace")
|
||||
|
||||
Reference in New Issue
Block a user