Skip to content

Commit

Permalink
fix: feedback corespondents not able to see CUR level summaries
Browse files Browse the repository at this point in the history
Co-authored-by: tfhuhtal <tuomas.huhtala@icloud.com>
  • Loading branch information
HRemonen and tfhuhtal committed Oct 21, 2024
1 parent 689f435 commit b81392a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/services/summary/getCourseUnitGroupSummary.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ const getCourseUnitGroupSummaries = async ({ user, courseCode, startDate, endDat
)
const allOrgIds = cuOrgIds.concat(curOrgIds)

const hasOrgAccess = Object.values(orgAccess).some(o => allOrgIds.includes(o.id))
const hasOrgAccess = Object.values(orgAccess).some(o => allOrgIds.includes(o.organisation.id))

if (!user.isAdmin && !hasOrgAccess) {
const hasCurAccess = feedbackTargets.some(fbt => accessibleCurIds.includes(fbt.courseRealisation.id))
if (!hasCurAccess) {
Expand Down

0 comments on commit b81392a

Please sign in to comment.