mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +00:00
tmp - condition
This commit is contained in:
parent
db90d338a5
commit
e5be086429
@ -7,7 +7,19 @@ module.exports = {
|
||||
*
|
||||
* This gives you an opportunity to extend code.
|
||||
*/
|
||||
register({ strapi }) {},
|
||||
async register({ strapi }) {
|
||||
await strapi.admin.services.permission.conditionProvider.register({
|
||||
displayName: 'Something',
|
||||
name: 'is-something',
|
||||
plugin: 'foo',
|
||||
handler: (user) => ({
|
||||
// name: { $ne: 'MARC' },
|
||||
// addresses: { notrepeat_req: { name: 'toto' } },
|
||||
'addresses.repeat_req': { $elemMatch: { name: 'toto' } },
|
||||
addresses: { $elemMatch: { postal_code: { $eq: '58' } } },
|
||||
}),
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* An asynchronous bootstrap function that runs before
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user