Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
security: {
shield: {
FormsQuery: {
getSettings: hasScope("cms:settings"),
getForm: hasScope("forms:form:crud"),
listForms: hasScope("forms:form:crud"),
listFormSubmissions: hasScope("forms:form:crud")
// listPublishedForms: hasScope("forms:form:crud") // Expose publicly.
// getPublishedForms: hasScope("forms:form:crud") // Expose publicly.
},
FormsMutation: {
updateSettings: hasScope("cms:settings"),
createForm: hasScope("forms:form:crud"),
deleteForm: hasScope("forms:form:crud"),
createRevisionFrom: hasScope("forms:form:revision:create"),
updateRevision: hasScope("forms:form:revision:update"),
publishRevision: hasScope("forms:form:revision:publish"),
unpublishRevision: hasScope("forms:form:revision:unpublish"),
deleteRevision: hasScope("forms:form:revision:delete"),
exportFormSubmissions: hasScope("forms:form:submission:export")
// saveFormView: hasScope("forms:form:revision:delete") // Expose publicly.
// createFormSubmission: hasScope("forms:form:revision:delete") // Expose publicly.
}
}
}
};
forms: emptyResolver
},
Mutation: {
forms: emptyResolver
}
},
form.resolvers,
formSubmission.resolvers,
formsSettings.resolvers
)
},
security: {
shield: {
FormsQuery: {
getSettings: hasScope("cms:settings"),
getForm: hasScope("forms:form:crud"),
listForms: hasScope("forms:form:crud"),
listFormSubmissions: hasScope("forms:form:crud")
// listPublishedForms: hasScope("forms:form:crud") // Expose publicly.
// getPublishedForms: hasScope("forms:form:crud") // Expose publicly.
},
FormsMutation: {
updateSettings: hasScope("cms:settings"),
createForm: hasScope("forms:form:crud"),
deleteForm: hasScope("forms:form:crud"),
createRevisionFrom: hasScope("forms:form:revision:create"),
updateRevision: hasScope("forms:form:revision:update"),
publishRevision: hasScope("forms:form:revision:publish"),
unpublishRevision: hasScope("forms:form:revision:unpublish"),
deleteRevision: hasScope("forms:form:revision:delete"),
exportFormSubmissions: hasScope("forms:form:submission:export")
// saveFormView: hasScope("forms:form:revision:delete") // Expose publicly.
});
}
return new ErrorResponse({
message: e.message
});
}
},
updateSettings: resolveUpdateSettings(({ models }) => models.MailchimpSettings)
}
}
},
security: {
shield: {
MailchimpQuery: {
getSettings: hasScope("pb:settings")
},
MailchimpMutation: {
updateSettings: hasScope("pb:settings")
}
}
}
},
{
type: "api-page-builder-model",
name: "api-page-builder-model-mailchimp-settings",
model({ models, createBase }) {
models.MailchimpSettings = mailchimpSettings({ createBase });
}
}
];
},
page.resolvers,
category.resolvers,
menu.resolvers,
settings.resolvers,
install.resolvers
)
},
security: {
shield: {
PbQuery: {
getMenu: hasScope("pb:menu:crud"),
listMenus: hasScope("pb:menu:crud"),
getCategory: hasScope("pb:category:crud"),
listCategories: hasScope("pb:category:crud"),
listPages: hasScope("pb:page:crud"),
listElements: hasScope("pb:element:crud"),
oembedData: hasScope("pb:oembed:read")
},
PbMutation: {
createMenu: hasScope("pb:menu:crud"),
updateMenu: hasScope("pb:menu:crud"),
deleteMenu: hasScope("pb:menu:crud"),
createCategory: hasScope("pb:category:crud"),
updateCategory: hasScope("pb:category:crud"),
deleteCategory: hasScope("pb:category:crud"),
createPage: hasScope("pb:page:crud"),
deletePage: hasScope("pb:page:crud"),
createRevisionFrom: hasScope("pb:page:revision:create"),
updateRevision: hasScope("pb:page:revision:update"),
)
},
security: {
shield: {
SecurityQuery: {
getGroup: hasScope("security:group:crud"),
listGroups: hasScope("security:group:crud"),
getRole: hasScope("security:role:crud"),
listRoles: hasScope("security:role:crud"),
getUser: hasScope("security:user:crud"),
listUsers: hasScope("security:user:crud")
},
SecurityMutation: {
createGroup: hasScope("security:group:crud"),
updateGroup: hasScope("security:group:crud"),
deleteGroup: hasScope("security:group:crud"),
createRole: hasScope("security:role:crud"),
updateRole: hasScope("security:role:crud"),
deleteRole: hasScope("security:role:crud"),
createUser: hasScope("security:user:crud"),
updateUser: hasScope("security:user:crud"),
deleteUser: hasScope("security:user:crud")
}
}
}
}
]: Array);
category.resolvers,
menu.resolvers,
settings.resolvers,
install.resolvers
)
},
security: {
shield: {
PbQuery: {
getMenu: hasScope("pb:menu:crud"),
listMenus: hasScope("pb:menu:crud"),
getCategory: hasScope("pb:category:crud"),
listCategories: hasScope("pb:category:crud"),
listPages: hasScope("pb:page:crud"),
listElements: hasScope("pb:element:crud"),
oembedData: hasScope("pb:oembed:read")
},
PbMutation: {
createMenu: hasScope("pb:menu:crud"),
updateMenu: hasScope("pb:menu:crud"),
deleteMenu: hasScope("pb:menu:crud"),
createCategory: hasScope("pb:category:crud"),
updateCategory: hasScope("pb:category:crud"),
deleteCategory: hasScope("pb:category:crud"),
createPage: hasScope("pb:page:crud"),
deletePage: hasScope("pb:page:crud"),
createRevisionFrom: hasScope("pb:page:revision:create"),
updateRevision: hasScope("pb:page:revision:update"),
publishRevision: hasScope("pb:page:revision:publish"),
deleteRevision: hasScope("pb:page:revision:delete"),
updateFile: resolveUpdate(getFile),
createFiles,
deleteFile,
install
}
}
},
security: {
shield: {
FilesQuery: {
getFile: hasScope("files:file:crud"),
},
FilesMutation: {
uploadFile: hasScope("files:file:crud"),
createFile: hasScope("files:file:crud"),
updateFile: hasScope("files:file:crud"),
deleteFile: hasScope("files:file:crud")
}
}
}
}
]: Array);
page.resolvers,
category.resolvers,
menu.resolvers,
settings.resolvers,
install.resolvers
)
},
security: {
shield: {
PbQuery: {
getMenu: hasScope("pb:menu:crud"),
listMenus: hasScope("pb:menu:crud"),
getCategory: hasScope("pb:category:crud"),
listCategories: hasScope("pb:category:crud"),
listPages: hasScope("pb:page:crud"),
listElements: hasScope("pb:element:crud"),
oembedData: hasScope("pb:oembed:read")
},
PbMutation: {
createMenu: hasScope("pb:menu:crud"),
updateMenu: hasScope("pb:menu:crud"),
deleteMenu: hasScope("pb:menu:crud"),
createCategory: hasScope("pb:category:crud"),
updateCategory: hasScope("pb:category:crud"),
deleteCategory: hasScope("pb:category:crud"),
createPage: hasScope("pb:page:crud"),
deletePage: hasScope("pb:page:crud"),
createRevisionFrom: hasScope("pb:page:revision:create"),
updateRevision: hasScope("pb:page:revision:update"),
publishRevision: hasScope("pb:page:revision:publish"),
uploadFiles,
createFile: resolveCreate(getFile),
updateFile: resolveUpdate(getFile),
createFiles,
deleteFile,
install
}
}
},
security: {
shield: {
FilesQuery: {
getFile: hasScope("files:file:crud"),
},
FilesMutation: {
uploadFile: hasScope("files:file:crud"),
createFile: hasScope("files:file:crud"),
updateFile: hasScope("files:file:crud"),
deleteFile: hasScope("files:file:crud")
}
}
}
}
]: Array);
scopes: getRegisteredScopes
}
},
install.resolvers,
role.resolvers,
group.resolvers,
user.resolvers
)
},
security: {
shield: {
SecurityQuery: {
getGroup: hasScope("security:group:crud"),
listGroups: hasScope("security:group:crud"),
getRole: hasScope("security:role:crud"),
listRoles: hasScope("security:role:crud"),
getUser: hasScope("security:user:crud"),
listUsers: hasScope("security:user:crud")
},
SecurityMutation: {
createGroup: hasScope("security:group:crud"),
updateGroup: hasScope("security:group:crud"),
deleteGroup: hasScope("security:group:crud"),
createRole: hasScope("security:role:crud"),
updateRole: hasScope("security:role:crud"),
deleteRole: hasScope("security:role:crud"),
createUser: hasScope("security:user:crud"),
updateUser: hasScope("security:user:crud"),
deleteUser: hasScope("security:user:crud")
}
}
}