Split employee devices from DeviceConnection
viewer.enrolledDevices shared DeviceConnection with the admin org list, so totalCount had to authorize with both employee-device:list and device:list. Mirror EmployeeDocumentConnection: a dedicated EmployeeDeviceConnection without totalCount, and keep DeviceConnection.totalCount for the org fleet only. Cover assumed-session device:get IDOR in e2e. Signed-off-by: Ludovic Vielle <ludovic@probo.com>
This commit is contained in:
@@ -57,6 +57,8 @@ var ViewerPolicy = policy.NewPolicy(
|
||||
).WithDescription("Read-only ITAM access for organization viewers")
|
||||
|
||||
// EmployeePolicy grants self-enrollment access to organization employees.
|
||||
// Employee-device list/get mirror core:employee-document:*: a dedicated
|
||||
// surface so employees can read their own devices without itam:device:list.
|
||||
var EmployeePolicy = policy.NewPolicy(
|
||||
"itam:employee",
|
||||
"ITAM Employee",
|
||||
|
||||
Reference in New Issue
Block a user