strapi/packages/core/admin/models/Permission.js
2021-06-24 09:12:18 +02:00

58 lines
1011 B
JavaScript

'use strict';
/**
* Lifecycle callbacks for the `Permission` model.
*/
module.exports = {
collectionName: 'strapi_permissions',
info: {
name: 'Permission',
description: '',
},
options: {
timestamps: true,
},
pluginOptions: {
'content-manager': {
visible: false,
},
'content-type-builder': {
visible: false,
},
},
attributes: {
action: {
type: 'string',
minLength: 1,
configurable: false,
required: true,
},
subject: {
type: 'string',
minLength: 1,
configurable: false,
required: false,
},
properties: {
type: 'json',
configurable: false,
required: false,
default: {},
},
conditions: {
type: 'json',
configurable: false,
required: false,
default: [],
},
role: {
configurable: false,
type: 'relation',
relation: 'manyToOne',
inversedBy: 'permissions',
target: 'strapi::role',
},
},
};