@@ -296,15 +296,11 @@ func ReloadBuiltinRoles(opts *RoleOptions) {
296
296
ResourceWorkspaceProxy .Type : {policy .ActionRead },
297
297
}),
298
298
Org :map [string ][]Permission {},
299
- User :append (allPermsExcept (ResourceWorkspaceDormant ,ResourcePrebuiltWorkspace ,ResourceUser ,ResourceOrganizationMember ),
299
+ User :append (allPermsExcept (ResourceWorkspace , ResourceWorkspaceDormant ,ResourcePrebuiltWorkspace ,ResourceUser ,ResourceOrganizationMember ),
300
300
Permissions (map [string ][]policy.Action {
301
- // Reduced permission set on dormant workspaces. No build, ssh, or exec
302
- ResourceWorkspaceDormant .Type : {policy .ActionRead ,policy .ActionDelete ,policy .ActionCreate ,policy .ActionUpdate ,policy .ActionWorkspaceStop ,policy .ActionCreateAgent ,policy .ActionDeleteAgent },
303
301
// Users cannot do create/update/delete on themselves, but they
304
302
// can read their own details.
305
303
ResourceUser .Type : {policy .ActionRead ,policy .ActionReadPersonal ,policy .ActionUpdatePersonal },
306
- // Can read their own organization member record
307
- ResourceOrganizationMember .Type : {policy .ActionRead },
308
304
// Users can create provisioner daemons scoped to themselves.
309
305
ResourceProvisionerDaemon .Type : {policy .ActionRead ,policy .ActionCreate ,policy .ActionRead ,policy .ActionUpdate },
310
306
})... ,
@@ -454,8 +450,16 @@ func ReloadBuiltinRoles(opts *RoleOptions) {
454
450
ResourceAssignOrgRole .Type : {policy .ActionRead },
455
451
}),
456
452
},
457
- User : []Permission {},
458
- OrgMember :map [string ][]Permission {},
453
+ User : []Permission {},
454
+ OrgMember :map [string ][]Permission {
455
+ organizationID .String ():Permissions (map [string ][]policy.Action {
456
+ ResourceWorkspace .Type :ResourceWorkspace .AvailableActions (),
457
+ // Reduced permission set on dormant workspaces. No build, ssh, or exec
458
+ ResourceWorkspaceDormant .Type : {policy .ActionRead ,policy .ActionDelete ,policy .ActionCreate ,policy .ActionUpdate ,policy .ActionWorkspaceStop ,policy .ActionCreateAgent ,policy .ActionDeleteAgent },
459
+ // Can read their own organization member record
460
+ ResourceOrganizationMember .Type : {policy .ActionRead },
461
+ }),
462
+ },
459
463
}
460
464
},
461
465
orgAuditor :func (organizationID uuid.UUID )Role {