namespaces API keys, finds collection based on JWT collection payload

This commit is contained in:
James
2020-07-01 18:32:39 -04:00
parent b1b6add2c0
commit fef816fac3
19 changed files with 132 additions and 97 deletions

View File

@@ -189,6 +189,11 @@ const AllFields = {
name: 'relationshipMultipleCollections',
relationTo: ['localized-posts', 'conditions'],
},
{
type: 'textarea',
label: 'Textarea',
name: 'textarea',
},
],
timestamps: true,
};

View File

@@ -12,21 +12,7 @@ module.exports = {
policies: {
admin: () => false,
create: () => true,
read: ({ req: { user } }) => {
if (checkRole(['admin'], user)) {
return true;
}
if (user) {
return {
id: {
equals: user.id,
},
};
}
return false;
},
read: () => true,
update: ({ req: { user } }) => {
if (checkRole(['admin'], user)) {
return true;