Files
DiceCloud/app/imports/api/sharing/SharingSchema.js
2023-09-28 21:27:05 +02:00

43 lines
813 B
JavaScript

import SimpleSchema from 'simpl-schema';
import '/imports/api/sharing/sharing';
import STORAGE_LIMITS from '/imports/constants/STORAGE_LIMITS';
let SharingSchema = new SimpleSchema({
owner: {
type: String,
regEx: SimpleSchema.RegEx.Id,
index: 1
},
readers: {
type: Array,
defaultValue: [],
index: 1,
maxCount: STORAGE_LIMITS.readersCount,
},
'readers.$': {
type: String,
regEx: SimpleSchema.RegEx.Id
},
writers: {
type: Array,
defaultValue: [],
index: 1,
maxCount: STORAGE_LIMITS.writersCount,
},
'writers.$': {
type: String,
regEx: SimpleSchema.RegEx.Id
},
public: {
type: Boolean,
defaultValue: false,
index: 1,
},
readersCanCopy: {
type: Boolean,
optional: true,
},
});
export default SharingSchema;