strapi/packages/core/admin/models/Permission.js

56 lines
939 B
JavaScript
Raw Normal View History

'use strict';
/**
* Lifecycle callbacks for the `Permission` model.
*/
2021-05-17 16:34:19 +02:00
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,
model: 'role',
plugin: 'admin',
},
},
};