Browse Source

fix resp msg

abhishek9686 1 năm trước cách đây
mục cha
commit
088c108b93
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      pro/logic/security.go

+ 1 - 1
pro/logic/security.go

@@ -163,7 +163,7 @@ func GlobalPermissionsCheck(username string, r *http.Request) error {
 	}
 	rsrcPermissionScope, ok := userRole.GlobalLevelAccess[models.RsrcType(targetRsrc)]
 	if !ok {
-		return fmt.Errorf("access denied to %s rsrc", targetRsrc)
+		return fmt.Errorf("access denied to %s", targetRsrc)
 	}
 	if allRsrcsTypePermissionScope, ok := rsrcPermissionScope[models.RsrcID(fmt.Sprintf("all_%s", targetRsrc))]; ok {
 		return checkPermissionScopeWithReqMethod(allRsrcsTypePermissionScope, r.Method)