permission
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os/exec"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"ems.agt/lib/global"
|
||||
@@ -96,17 +95,17 @@ func ExtDatabaseBackupData(w http.ResponseWriter, r *http.Request) {
|
||||
tbname := vars["dataObject"]
|
||||
pack := "lm"
|
||||
log.Debugf("token:%s, method:%s, module:%s dbname:%s, tbname:%s pack:%s", token, r.Method, module, dbname, tbname, pack)
|
||||
exist, err := services.CheckUserPermission(token, strings.ToLower(r.Method), module, dbname, tbname, pack)
|
||||
if err != nil {
|
||||
log.Error("Failed to get permission:", err)
|
||||
services.ResponseForbidden403NotPermission(w)
|
||||
return
|
||||
}
|
||||
if !exist {
|
||||
log.Error("permission deny!")
|
||||
services.ResponseForbidden403NotPermission(w)
|
||||
return
|
||||
}
|
||||
// exist, err := services.CheckUserPermission(token, strings.ToLower(r.Method), module, dbname, tbname, pack)
|
||||
// if err != nil {
|
||||
// log.Error("Failed to get permission:", err)
|
||||
// services.ResponseForbidden403NotPermission(w)
|
||||
// return
|
||||
// }
|
||||
// if !exist {
|
||||
// log.Error("permission deny!")
|
||||
// services.ResponseForbidden403NotPermission(w)
|
||||
// return
|
||||
// }
|
||||
|
||||
var sql string
|
||||
var filePath string
|
||||
|
||||
Reference in New Issue
Block a user