Skip to content

Commit

Permalink
Add rulings under permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
oddsson committed Dec 12, 2024
1 parent f48f1e0 commit a215505
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ const useFilePermissions = (workingCase: Case, user?: User) => {
isDefenceUser(user)),
canViewSentToPrisonAdminFiles:
isPrisonAdminUser(user) || isPublicProsecutorUser(user),
canViewRulings:
isDistrictCourtUser(user) || isCompletedCase(workingCase.state),
}),
[user, workingCase.hasCivilClaims],
)
Expand Down Expand Up @@ -255,7 +257,7 @@ const IndictmentCaseFilesList: FC<Props> = ({
onOpenFile={onOpen}
/>
)}
{(isDistrictCourtUser(user) || isCompletedCase(workingCase.state)) &&
{permissions.canViewRulings &&
filteredFiles.rulings &&
filteredFiles.rulings.length > 0 && (
<RenderFiles
Expand Down

0 comments on commit a215505

Please sign in to comment.