The Open Source kanban (built with Meteor). Keep variable/table/field names camelCase. For translations, only add Pull Request changes to wekan/i18n/en.i18n.json , other translations are done at https://transifex.com/wekan/wekan only.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
wekan/server/attachmentMigrationStatus.js

22 lines
849 B

import { Mongo } from 'meteor/mongo';
// Server-side collection for attachment migration status
export const AttachmentMigrationStatus = new Mongo.Collection('attachmentMigrationStatus');
// Allow/Deny rules
// This collection is server-only and should not be modified by clients
// Allow server-side operations (when userId is undefined) but deny all client operations
if (Meteor.isServer) {
AttachmentMigrationStatus.allow({
insert: (userId) => !userId,
update: (userId) => !userId,
remove: (userId) => !userId,
});
}
// Create indexes for better query performance
Meteor.startup(() => {
AttachmentMigrationStatus._collection.createIndexAsync({ boardId: 1 });
AttachmentMigrationStatus._collection.createIndexAsync({ userId: 1, boardId: 1 });
AttachmentMigrationStatus._collection.createIndexAsync({ updatedAt: -1 });
});