Skip to content

Commit

Permalink
Fix: Change placement of checking ResourceRead (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
aleklundeq authored Sep 14, 2023
1 parent 2aabb06 commit c08120c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ public async Task<ActionResult<ApiCollection<ApiResourceAllocationRequest>>> Get

r.AnyOf(or =>
{
or.ResourcesRead();

if (!query.HasFilter) return;

var filter = query.Filter.GetFilterForField("assignedDepartment");
Expand All @@ -501,7 +503,6 @@ public async Task<ActionResult<ApiCollection<ApiResourceAllocationRequest>>> Get
);
or.HaveOrgUnitScopedRole(DepartmentId.FromFullPath(departmentString), AccessRoles.ResourceOwner);
}
or.ResourcesRead();
});
});

Expand Down

0 comments on commit c08120c

Please sign in to comment.