mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 18:10:06 -05:00
Reuse board permissions, card estimates and chart exports for Product Backlog, Sprints, Sprint Report and Velocity views. Add revision-checked sprint lifecycle, recoverable rollover, release/event creation and independently hidden metadata controls. Explicitly label assigned-only reports as partial. Verified 12 focused Node checks, a real Meteor/Mongo lifecycle regression and three Chromium scenarios including settings visibility, denial paths and actual Excel/PDF files. History integration, full transfer mappings and further report/editor work remain tracked in the Scrum design. Thanks to xet7 !
23 lines
857 B
JavaScript
23 lines
857 B
JavaScript
import { Meteor } from 'meteor/meteor';
|
|
import { check } from 'meteor/check';
|
|
import { getScrumBoardData } from '/server/scrum';
|
|
|
|
// One-shot, permission-filtered snapshot, like the getBoardData method. Consumers
|
|
// explicitly refresh after edits; no live cursor can outlive its authorization.
|
|
Meteor.publish('boardScrum', async function(boardId) {
|
|
check(boardId, String);
|
|
try {
|
|
const data = await getScrumBoardData(this.userId, boardId);
|
|
for (const [collection, records] of [['scrumSprints', data.sprints], ['scrumReleases', data.releases], ['scrumEvents', data.events]]) {
|
|
for (const record of records) {
|
|
const { _id, ...fields } = record;
|
|
this.added(collection, _id, fields);
|
|
}
|
|
}
|
|
this.ready();
|
|
} catch (error) {
|
|
if (error.error === 'not-authorized') this.ready();
|
|
else this.error(error);
|
|
}
|
|
});
|