mirror of
https://github.com/strapi/strapi.git
synced 2025-09-08 08:08:18 +00:00
58 lines
1011 B
JavaScript
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',
|
|
},
|
|
},
|
|
};
|