Skip to content

Commit

Permalink
fix: 设备分享
Browse files Browse the repository at this point in the history
  • Loading branch information
godLei6 committed Dec 20, 2024
1 parent 9f7b620 commit ac9adeb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions service/dmsvr/internal/repo/relationDB/deviceInfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ func (d DeviceInfoRepo) fmtFilter(ctx context.Context, f DeviceFilter) *gorm.DB
or := d.db
or = or.Or("(product_id, device_name) in (?)", subQuery)
pa := uc.ProjectAuth[uc.ProjectID]
if pa == nil && uc.IsAdmin {
pa = &ctxs.ProjectAuth{AuthType: def.AuthAdmin}
}
if pa == nil {
db = db.WithContext(ctxs.WithAllProject(ctxs.WithAllArea(ctx))).Where("(product_id, device_name) in (?)",
subQuery)
Expand Down

0 comments on commit ac9adeb

Please sign in to comment.