mirror of
https://github.com/wekan/wekan.git
synced 2026-02-10 10:14:21 +01:00
16 lines
389 B
JavaScript
16 lines
389 B
JavaScript
import { CronJobStatus } from '../cronJobStorage';
|
|
|
|
// Publish migration status for admin users only
|
|
Meteor.publish('cronMigrationStatus', function() {
|
|
if (!this.userId) {
|
|
return this.ready();
|
|
}
|
|
|
|
const user = Users.findOne(this.userId);
|
|
if (!user || !user.isAdmin) {
|
|
return this.ready();
|
|
}
|
|
|
|
// Publish all cron job status documents
|
|
return CronJobStatus.find({});
|
|
});
|