This commit is contained in:
2023-08-18 13:57:36 +08:00
parent 3e726ddd99
commit 882baa2e0b
5 changed files with 49 additions and 34 deletions

View File

@@ -57,6 +57,7 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
}
vars := mux.Vars(r)
module := vars["managementModule"]
neType := vars["elementTypeValue"]
params := r.URL.Query()
neId := params["ne_id"]
@@ -67,13 +68,13 @@ func PostMMLToNF(w http.ResponseWriter, r *http.Request) {
}
log.Debug("neType:", neType, "neId", neId)
log.Debugf("token:%s, method:%s, dbname:%s, tbname:%s", token, r.Method, neType, neId[0])
log.Debugf("token:%s, method:%s, managementModule:%s dbname:%s, tbname:%s", token, r.Method, module, neType, neId[0])
var buf [8192]byte
var n int
var mmlResult []string
exist, err := services.CheckUserPermission(token, strings.ToLower(r.Method), neType, neId[0])
exist, err := services.CheckUserPermission(token, strings.ToLower(r.Method), module, neType, neId[0])
if err != nil {
log.Error("Failed to get permission:", err)
errMsg := fmt.Sprintf("RetCode = -1 operation failed: do not have the operation permissions")