mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
viewableBy -> canRead
This commit is contained in:
parent
725320fab1
commit
50fba6b0a3
14 changed files with 96 additions and 80 deletions
|
@ -10,7 +10,7 @@ export const addCustomFields = collection => {
|
|||
fieldSchema: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -18,7 +18,7 @@ export const addCustomFields = collection => {
|
|||
fieldSchema: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ export const addCustomFields = collection => {
|
|||
fieldSchema: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
arguments: 'format: String',
|
||||
|
|
|
@ -3,66 +3,66 @@ import { Callbacks } from 'meteor/vulcan:lib';
|
|||
const schema = {
|
||||
name: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
iterator: {
|
||||
type: Object,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
properties: {
|
||||
type: Array,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
'properties.$': {
|
||||
type: Object,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
// iterator: {
|
||||
// label: 'Iterator',
|
||||
// type: String,
|
||||
// viewableBy: ['admins'],
|
||||
// canRead: ['admins'],
|
||||
// },
|
||||
|
||||
// options: {
|
||||
// label: 'Options',
|
||||
// type: Array,
|
||||
// viewableBy: ['admins'],
|
||||
// canRead: ['admins'],
|
||||
// },
|
||||
|
||||
// 'options.$': {
|
||||
// type: Object,
|
||||
// viewableBy: ['admins'],
|
||||
// canRead: ['admins'],
|
||||
// },
|
||||
|
||||
runs: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
newSyntax: {
|
||||
label: 'New Syntax',
|
||||
type: Boolean,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
returns: {
|
||||
label: 'Should Return',
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
description: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
hooks: {
|
||||
type: Array,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
type: '[String]',
|
||||
resolver: callback => {
|
||||
|
|
|
@ -3,31 +3,31 @@ const schema = {
|
|||
name: {
|
||||
label: 'Name',
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
value: {
|
||||
label: 'Value',
|
||||
type: Object,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
defaultValue: {
|
||||
label: 'Default Value',
|
||||
type: Object,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
isPublic: {
|
||||
label: 'Public',
|
||||
type: Boolean,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
description: {
|
||||
label: 'Description',
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const schema = {
|
||||
createdAt: {
|
||||
type: Date,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
optional: true,
|
||||
onInsert: () => {
|
||||
return new Date()
|
||||
|
@ -9,7 +9,7 @@ const schema = {
|
|||
},
|
||||
name: {
|
||||
type: String,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
insertableBy: ['guests'],
|
||||
},
|
||||
userId: {
|
||||
|
@ -33,7 +33,7 @@ const schema = {
|
|||
type: Object,
|
||||
optional: true,
|
||||
blackbox: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
insertableBy: ['guests'],
|
||||
},
|
||||
};
|
||||
|
|
|
@ -87,7 +87,7 @@ Posts.addField({
|
|||
control: getComponent('Upload'),
|
||||
insertableBy: ['members'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
form: {
|
||||
options: {
|
||||
preset: getSetting('cloudinaryPresets').posts // this setting refers to the transformation you want to apply to the image
|
||||
|
@ -113,7 +113,7 @@ Users.addField({
|
|||
control: getComponent('Upload'),
|
||||
insertableBy: ['members'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
preload: true, // ⚠️ will preload the field for the current user!
|
||||
form: {
|
||||
options: {
|
||||
|
|
|
@ -68,6 +68,21 @@ class FormWrapper extends PureComponent {
|
|||
return this.props.documentId || this.props.slug ? "edit" : "new";
|
||||
}
|
||||
|
||||
getReadableFields() {
|
||||
// OpenCRUD backwards compatibility
|
||||
return Object.keys(this.getSchema()).filter(fieldName => schema[fieldName].canRead || schema[fieldName].viewableBy);
|
||||
}
|
||||
|
||||
getCreateableFields() {
|
||||
// OpenCRUD backwards compatibility
|
||||
return Object.keys(this.getSchema()).filter(fieldName => schema[fieldName].canCreate || schema[fieldName].insertableBy);
|
||||
}
|
||||
|
||||
getUpdatetableFields() {
|
||||
// OpenCRUD backwards compatibility
|
||||
return Object.keys(this.getSchema()).filter(fieldName => schema[fieldName].canUpdate || schema[fieldName].editableBy);
|
||||
}
|
||||
|
||||
// get fragment used to decide what data to load from the server to populate the form,
|
||||
// as well as what data to ask for as return value for the mutation
|
||||
getFragments() {
|
||||
|
@ -75,16 +90,15 @@ class FormWrapper extends PureComponent {
|
|||
const prefix = `${this.getCollection()._name}${Utils.capitalize(this.getFormType())}`
|
||||
const fragmentName = `${prefix}FormFragment`;
|
||||
|
||||
const schema = this.getSchema();
|
||||
const fields = this.props.fields;
|
||||
const viewableFields = _.filter(_.keys(schema), fieldName => !!schema[fieldName].viewableBy);
|
||||
const insertableFields = _.filter(_.keys(schema), fieldName => !!schema[fieldName].insertableBy);
|
||||
const editableFields = _.filter(_.keys(schema), fieldName => !!schema[fieldName].editableBy);
|
||||
const readableFields = this.getReadableFields();
|
||||
const createableFields = this.getCreateableFields();
|
||||
const updatetableFields = this.getUpdatetableFields();
|
||||
|
||||
// get all editable/insertable fields (depending on current form type)
|
||||
let queryFields = this.getFormType() === 'new' ? insertableFields : editableFields;
|
||||
let queryFields = this.getFormType() === 'new' ? createableFields : updatetableFields;
|
||||
// for the mutations's return value, also get non-editable but viewable fields (such as createdAt, userId, etc.)
|
||||
let mutationFields = this.getFormType() === 'new' ? _.unique(insertableFields.concat(viewableFields)) : _.unique(insertableFields.concat(editableFields));
|
||||
let mutationFields = this.getFormType() === 'new' ? _.unique(createableFields.concat(readableFields)) : _.unique(createableFields.concat(updatetableFields));
|
||||
|
||||
// if "fields" prop is specified, restrict list of fields to it
|
||||
if (typeof fields !== "undefined" && fields.length > 0) {
|
||||
|
|
|
@ -84,7 +84,8 @@ export const getDefaultFragmentText = (collection, options = { onlyViewable: tru
|
|||
|
||||
*/
|
||||
const field = schema[fieldName];
|
||||
return (field.resolveAs && !field.resolveAs.addOriginalField) || fieldName.indexOf('$') !== -1 || options.onlyViewable && !field.viewableBy
|
||||
// OpenCRUD backwards compatibility
|
||||
return (field.resolveAs && !field.resolveAs.addOriginalField) || fieldName.indexOf('$') !== -1 || options.onlyViewable && !(field.canRead || field.viewableBy);
|
||||
});
|
||||
|
||||
if (fieldNames.length) {
|
||||
|
|
|
@ -140,7 +140,8 @@ export const GraphQLSchema = {
|
|||
|
||||
// only include fields that are viewable/insertable/editable and don't contain "$" in their name
|
||||
// note: insertable/editable fields must be included in main schema in case they're returned by a mutation
|
||||
if ((field.viewableBy || field.insertableBy || field.editableBy) && fieldName.indexOf('$') === -1) {
|
||||
// OpenCRUD backwards compatibility
|
||||
if ((field.canRead || field.canCreate || field.canUpdate || field.viewableBy || field.insertableBy || field.editableBy) && fieldName.indexOf('$') === -1) {
|
||||
|
||||
const fieldDescription = field.description;
|
||||
const fieldDirective = isIntlField(field) ? `@intl` : '';
|
||||
|
|
|
@ -10,7 +10,7 @@ Users.addField([
|
|||
defaultValue: false,
|
||||
insertableBy: ['members'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
control: 'NewsletterSubscribe',
|
||||
group: {
|
||||
name: "newsletter",
|
||||
|
|
|
@ -7,12 +7,12 @@ const schema = {
|
|||
_id: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
createdAt: {
|
||||
type: Date,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
onInsert: (document, currentUser) => {
|
||||
return new Date();
|
||||
},
|
||||
|
@ -20,7 +20,7 @@ const schema = {
|
|||
userId: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
fieldName: 'user',
|
||||
type: 'User',
|
||||
|
@ -34,20 +34,20 @@ const schema = {
|
|||
type: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
},
|
||||
|
||||
// custom properties
|
||||
|
||||
associatedCollection: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
optional: true,
|
||||
},
|
||||
|
||||
associatedId: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
optional: true,
|
||||
},
|
||||
|
||||
|
@ -58,37 +58,37 @@ const schema = {
|
|||
|
||||
productKey: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
optional: true,
|
||||
},
|
||||
|
||||
source: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
optional: false,
|
||||
},
|
||||
|
||||
test: {
|
||||
type: Boolean,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
optional: true,
|
||||
},
|
||||
|
||||
data: {
|
||||
type: Object,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
blackbox: true,
|
||||
},
|
||||
|
||||
properties: {
|
||||
type: Object,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
blackbox: true,
|
||||
},
|
||||
|
||||
ip: {
|
||||
type: String,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
optional: true,
|
||||
},
|
||||
|
||||
|
@ -97,7 +97,7 @@ const schema = {
|
|||
amount: {
|
||||
type: Number,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
type: 'Int',
|
||||
resolver: charge => charge.data.amount,
|
||||
|
@ -107,7 +107,7 @@ const schema = {
|
|||
createdAtFormatted: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
resolver: (charge, args, context) => {
|
||||
|
@ -119,7 +119,7 @@ const schema = {
|
|||
createdAtFormattedShort: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
resolver: (charge, args, context) => {
|
||||
|
@ -131,7 +131,7 @@ const schema = {
|
|||
stripeId: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
resolver: (charge, args, context) => {
|
||||
|
@ -143,7 +143,7 @@ const schema = {
|
|||
stripeChargeUrl: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
resolver: (charge, args, context) => {
|
||||
|
@ -156,7 +156,7 @@ const schema = {
|
|||
|
||||
// associatedDocument: {
|
||||
// type: Object,
|
||||
// viewableBy: ['admins'],
|
||||
// canRead: ['admins'],
|
||||
// optional: true,
|
||||
// resolveAs: {
|
||||
// type: 'Chargeable',
|
||||
|
|
|
@ -34,12 +34,12 @@ const schema = {
|
|||
_id: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
insertableBy: ['guests'],
|
||||
onInsert: user => {
|
||||
if (user.services && user.services.twitter && user.services.twitter.screenName) {
|
||||
|
@ -68,7 +68,7 @@ const schema = {
|
|||
createdAt: {
|
||||
type: Date,
|
||||
optional: true,
|
||||
viewableBy: ['admins'],
|
||||
canRead: ['admins'],
|
||||
onInsert: () => {
|
||||
return new Date();
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ const schema = {
|
|||
optional: true,
|
||||
insertableBy: ['admins'],
|
||||
editableBy: ['admins'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
group: adminGroup,
|
||||
},
|
||||
locale: {
|
||||
|
@ -90,7 +90,7 @@ const schema = {
|
|||
control: 'select',
|
||||
insertableBy: ['members'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
options: () => Locales.map(({ id, label }) => ({ value: id, label })),
|
||||
},
|
||||
profile: {
|
||||
|
@ -109,7 +109,7 @@ const schema = {
|
|||
type: Object,
|
||||
optional: true,
|
||||
blackbox: true,
|
||||
viewableBy: ownsOrIsAdmin,
|
||||
canRead: ownsOrIsAdmin,
|
||||
},
|
||||
/**
|
||||
The name displayed throughout the app. Can contain spaces and special characters, doesn't need to be unique
|
||||
|
@ -120,7 +120,7 @@ const schema = {
|
|||
control: "text",
|
||||
insertableBy: ['members'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
order: 10,
|
||||
onInsert: (user, options) => {
|
||||
const profileName = Utils.getNestedProperty(user, 'profile.name');
|
||||
|
@ -145,7 +145,7 @@ const schema = {
|
|||
control: "text",
|
||||
insertableBy: ['guests'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ownsOrIsAdmin,
|
||||
canRead: ownsOrIsAdmin,
|
||||
order: 20,
|
||||
onInsert: (user) => {
|
||||
// look in a few places for the user email
|
||||
|
@ -171,7 +171,7 @@ const schema = {
|
|||
emailHash: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
onInsert: user => {
|
||||
if (user.email) {
|
||||
return getCollection('Users').avatar.hash(user.email);
|
||||
|
@ -181,7 +181,7 @@ const schema = {
|
|||
avatarUrl: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
onInsert: user => {
|
||||
|
||||
const twitterAvatar = Utils.getNestedProperty(user, 'services.twitter.profile_image_url_https');
|
||||
|
@ -217,7 +217,7 @@ const schema = {
|
|||
slug: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
order: 40,
|
||||
onInsert: user => {
|
||||
// create a basic slug from display name and then modify it if this slugs already exists;
|
||||
|
@ -234,7 +234,7 @@ const schema = {
|
|||
control: "text",
|
||||
insertableBy: ['members'],
|
||||
editableBy: ['members'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
order: 60,
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
|
@ -257,7 +257,7 @@ const schema = {
|
|||
control: "checkboxgroup",
|
||||
insertableBy: ['admins'],
|
||||
editableBy: ['admins'],
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
group: adminGroup,
|
||||
form: {
|
||||
options: function () {
|
||||
|
@ -276,7 +276,7 @@ const schema = {
|
|||
pageUrl: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
resolver: (user, args, { Users }) => {
|
||||
|
@ -288,7 +288,7 @@ const schema = {
|
|||
editUrl: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
resolveAs: {
|
||||
type: 'String',
|
||||
resolver: (user, args, { Users }) => {
|
||||
|
|
|
@ -11,7 +11,7 @@ Users.addField([
|
|||
fieldSchema: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
viewableBy: Users.owns,
|
||||
canRead: Users.owns,
|
||||
resolveAs: {
|
||||
type: '[Vote]',
|
||||
arguments: 'collectionName: String',
|
||||
|
|
|
@ -15,7 +15,7 @@ export const makeVoteable = collection => {
|
|||
fieldSchema: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
resolveAs: {
|
||||
type: '[Vote]',
|
||||
resolver: async (document, args, { Users, Votes, currentUser }) => {
|
||||
|
@ -44,7 +44,7 @@ export const makeVoteable = collection => {
|
|||
fieldSchema: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
resolveAs: {
|
||||
type: '[Vote]',
|
||||
resolver: async (document, args, { Users, Votes, currentUser }) => {
|
||||
|
@ -72,7 +72,7 @@ export const makeVoteable = collection => {
|
|||
fieldSchema: {
|
||||
type: Array,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
resolveAs: {
|
||||
type: '[User]',
|
||||
resolver: async (document, args, { currentUser, Users }) => {
|
||||
|
@ -105,7 +105,7 @@ export const makeVoteable = collection => {
|
|||
type: Number,
|
||||
optional: true,
|
||||
defaultValue: 0,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
onInsert: document => {
|
||||
// default to 0 if empty
|
||||
return document.baseScore || 0;
|
||||
|
@ -121,7 +121,7 @@ export const makeVoteable = collection => {
|
|||
type: Number,
|
||||
optional: true,
|
||||
defaultValue: 0,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
onInsert: document => {
|
||||
// default to 0 if empty
|
||||
return document.score || 0;
|
||||
|
|
|
@ -2,7 +2,7 @@ const schema = {
|
|||
|
||||
_id: {
|
||||
type: String,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -10,7 +10,7 @@ const schema = {
|
|||
*/
|
||||
documentId: {
|
||||
type: String,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -18,7 +18,7 @@ const schema = {
|
|||
*/
|
||||
collectionName: {
|
||||
type: String,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ const schema = {
|
|||
*/
|
||||
userId: {
|
||||
type: String,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -35,7 +35,7 @@ const schema = {
|
|||
voteType: {
|
||||
type: String,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -44,7 +44,7 @@ const schema = {
|
|||
power: {
|
||||
type: Number,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -53,7 +53,7 @@ const schema = {
|
|||
votedAt: {
|
||||
type: Date,
|
||||
optional: true,
|
||||
viewableBy: ['guests'],
|
||||
canRead: ['guests'],
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue