Refactor iam module.

This commit is contained in:
hongming
2018-06-26 13:46:54 +08:00
parent 479ef78f67
commit 6071095e24
15 changed files with 478 additions and 425 deletions

View File

@@ -20,11 +20,11 @@ import (
"net/http"
"github.com/emicklei/go-restful"
apierrors "k8s.io/apimachinery/pkg/api/errors"
"kubesphere.io/kubesphere/pkg/constants"
"kubesphere.io/kubesphere/pkg/models"
"kubesphere.io/kubesphere/pkg/models/iam"
)
func Register(ws *restful.WebService, subPath string) {
@@ -74,7 +74,7 @@ func delUser(req *restful.Request, resp *restful.Response) {
return
}
err = models.DeleteRoleBindings(user)
err = iam.DeleteRoleBindings(user)
if err != nil {
resp.WriteHeaderAndEntity(http.StatusInternalServerError, constants.MessageResponse{Message: err.Error()})