|
@@ -109,6 +109,16 @@ func (s *sussBi) Filter(r *ghttp.Request) error {
|
|
|
r.URL.RawQuery = newValues.Encode()
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if strings.HasPrefix(r.RequestURI, "/api/dw/services/downloadAttachment") || strings.HasPrefix(r.RequestURI, "/api/dw/services/getDwAttachments") {
|
|
|
+ if newValues, err := url.ParseQuery(r.URL.RawQuery); err == nil && len(newValues) > 0 {
|
|
|
+ if value, ok := newValues["params"]; ok && len(value) > 0 {
|
|
|
+ newValue := strings.ReplaceAll(value[0], "jyUserPositionId", fmt.Sprintf("%d", ctx.Sess.UserPositionId))
|
|
|
+ newValues["params"] = []string{newValue}
|
|
|
+ }
|
|
|
+ r.URL.RawQuery = newValues.Encode()
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return nil
|