case 4720 - restricted roles get filtered work order items in report data, rendering and export
Opening a work order filters it for restricted users (TechRestricted, SubContractor, SubContractorRestricted): only items they are scheduled on, and on those only their own labour, travel and scheduling, and for some roles no parts, units, expenses etc. Report data, rendering and export went through WorkOrderGetPartialAsync, which filtered nothing for child types (security review F27). Two causes: - the partial fetch now applies the same filtering: the item only if the user is scheduled on it (checked in the database), then its details filtered; the existing per-item filtering moved unchanged into RemoveRestrictedUserItemDetails so both fetches share it; - BizObjectFactory created WorkOrderBiz with UserType.Service for everyone, so in these paths a subcontractor was never treated as one; it now passes the user's real type (only the subcontractor flags depend on it). Checked: report data for a restricted subcontractor on work order 1 went from the whole item with parts to none; scheduled on an item, it gets the item without parts or other users' labour. Full suite: 111 passed, 5 skipped, the same 2 known failures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -204,7 +204,7 @@ take the next free number; a fixed or accepted finding keeps its ID and changes
|
||||
| F16 | High | **fixed in case 4712** | `schedule/svc` and `schedule/user` have no role check: anyone logged in sees the whole service schedule |
|
||||
| F17 | Medium | **fixed in case 4712** | Notification subscriptions accept any `UserId`, and object events reach subscribers without a rights check: record names to any email address |
|
||||
| F20 | High | candidate | Report templates receive the renderer's token (SuperUser for customer notification reports) and the report browser can reach any network address |
|
||||
| F27 | High | **confirmed** | Restricted roles (TechRestricted, SubContractor, SubContractorRestricted) get whole work-order items through report data, rendering and export |
|
||||
| F27 | High | **fixed in case 4720** | Restricted roles (TechRestricted, SubContractor, SubContractorRestricted) get whole work-order items through report data, rendering and export |
|
||||
| F28 | High | **fixed in case 4713** | Users with change rights on Customer (Service, Sales, Accounting) can give customer contact logins any role, BizAdmin and OpsAdmin included |
|
||||
| F33 | High | confirmed (code) | Client renders some record text as HTML without escaping (search results, work-order address dialog, unit warranty info, dialogs) |
|
||||
| F3 | High | confirmed (code) | Any logged-in user, customer contacts included, can send arbitrary email through the company's SMTP server |
|
||||
|
||||
Reference in New Issue
Block a user