mml
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user