Files
Lauri Ojansivu 15ff19d2a8 Export scoped daily Scrum observations to Excel and PDF
Share the bounded history reader with report downloads. Preserve exact UTC capture times, estimate policies, unknown counts and partial or truncated result notices. Verify real workbooks and extracted PDF text through the application.

Thanks to xet7 !
2026-09-27 22:27:51 +03:00

13 lines
600 B
JavaScript

'use strict';
const { isAssignedOnlyMember } = require('./boardCardScope');
// Board-wide exporters read related records without assignment filters. Board
// visibility therefore is insufficient for assigned-only members. The
// Scrum chart loaders explicitly scope cards and snapshots to the requester.
function canExportBoardData(board, user, chartKey = null) {
if (!board || !board.isVisibleBy(user)) return false;
if (!isAssignedOnlyMember(board, user?._id)) return true;
return ['scrumVelocity', 'scrumSprint', 'scrumDaily'].includes(chartKey);
}
module.exports = { canExportBoardData };