This commit is contained in:
2023-08-18 17:10:08 +08:00
parent 19f973c115
commit 23967c1a79
8 changed files with 54 additions and 25 deletions

View File

@@ -417,7 +417,7 @@ func CheckCommonValidRequest(w http.ResponseWriter, r *http.Request) (string, er
return token, nil
}
func CheckUserPermission(token, method, module, dbname, tbname string) (bool, error) {
func CheckUserPermission(token, method, module, dbname, tbname, pack string) (bool, error) {
if config.GetYamlConfig().OMC.RBACMode == true {
if module == "" {
module = "*"
@@ -428,7 +428,7 @@ func CheckUserPermission(token, method, module, dbname, tbname string) (bool, er
if tbname == "" {
tbname = "*"
}
exist, err := dborm.IsPermissionAllowed(token, method, module, dbname, tbname)
exist, err := dborm.IsPermissionAllowed(token, method, module, dbname, tbname, pack)
if err != nil {
return false, err
}