修改权限部分实现

This commit is contained in:
junleea 2025-10-18 22:50:05 +08:00
parent 99dda61a84
commit 80352e8601
1 changed files with 3 additions and 3 deletions

View File

@ -392,13 +392,13 @@ func UserFuncIntercept(id int, url string) bool {
//如果用户有权限,则不拦截
for k, v := range proto.Per_menu_map {
if strings.Contains(url, k) {
if v == 1 && user.VideoFunc > 0 {
if v == 1 && user.VideoFunc <= 0 {
return true
}
if v == 2 && user.DeviceFunc > 0 {
if v == 2 && user.DeviceFunc <= 0 {
return true
}
if v == 3 && user.CIDFunc > 0 {
if v == 3 && user.CIDFunc <= 0 {
return true
}
}