Skip to content

Commit

Permalink
Fix students accessing unavailable cooperation resources
Browse files Browse the repository at this point in the history
  • Loading branch information
ipasic-softserve committed Oct 10, 2024
1 parent 416bb33 commit 5f116cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/containers/course-section/resource-item/ResourceItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ const ResourceItem: FC<ResourceItemProps> = ({
)

const onResourceItemClick = () => {
if (!isView) return
if (
!isView ||
resourceAvailabilityStatus !== ResourceAvailabilityStatusEnum.Open
)
return
const type = resourceType ?? resource.resourceType

if (type === ResourceType.Attachment) {
Expand Down

0 comments on commit 5f116cf

Please sign in to comment.