mirror of
https://github.com/strapi/strapi.git
synced 2025-12-30 00:37:24 +00:00
rename plugins::content-manager.create to plugins::content-manager.explorer.create and others
Signed-off-by: Pierre Noël <petersg83@gmail.com>
This commit is contained in:
parent
b893501552
commit
6ab7669365
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const formatActionsBySections = require('./formatActionsBySections');
|
||||
const formatActionsBySections = require('./format-actions-by-sections');
|
||||
const { formatConditions } = require('./conditions');
|
||||
|
||||
module.exports = {
|
||||
|
||||
@ -12,28 +12,28 @@ Object {
|
||||
"sections": Object {
|
||||
"contentTypes": Array [
|
||||
Object {
|
||||
"action": "plugins::content-manager.create",
|
||||
"action": "plugins::content-manager.explorer.create",
|
||||
"displayName": "Create",
|
||||
"subjects": Array [
|
||||
"plugins::users-permissions.user",
|
||||
],
|
||||
},
|
||||
Object {
|
||||
"action": "plugins::content-manager.read",
|
||||
"action": "plugins::content-manager.explorer.read",
|
||||
"displayName": "Read",
|
||||
"subjects": Array [
|
||||
"plugins::users-permissions.user",
|
||||
],
|
||||
},
|
||||
Object {
|
||||
"action": "plugins::content-manager.update",
|
||||
"action": "plugins::content-manager.explorer.update",
|
||||
"displayName": "Update",
|
||||
"subjects": Array [
|
||||
"plugins::users-permissions.user",
|
||||
],
|
||||
},
|
||||
Object {
|
||||
"action": "plugins::content-manager.delete",
|
||||
"action": "plugins::content-manager.explorer.delete",
|
||||
"displayName": "Delete",
|
||||
"subjects": Array [
|
||||
"plugins::users-permissions.user",
|
||||
|
||||
@ -103,7 +103,7 @@ describe('Role CRUD End to End', () => {
|
||||
action: 'plugins::users-permissions.roles.update',
|
||||
},
|
||||
{
|
||||
action: 'plugins::content-manager.create',
|
||||
action: 'plugins::content-manager.explorer.create',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
@ -126,7 +126,7 @@ describe('Role CRUD End to End', () => {
|
||||
conditions: [],
|
||||
}),
|
||||
expect.objectContaining({
|
||||
action: 'plugins::content-manager.create',
|
||||
action: 'plugins::content-manager.explorer.create',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
@ -149,7 +149,7 @@ describe('Role CRUD End to End', () => {
|
||||
conditions: [],
|
||||
}),
|
||||
expect.objectContaining({
|
||||
action: 'plugins::content-manager.create',
|
||||
action: 'plugins::content-manager.explorer.create',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
@ -167,25 +167,25 @@ describe('Role CRUD End to End', () => {
|
||||
conditions: ['isOwner'],
|
||||
},
|
||||
{
|
||||
action: 'plugins::content-manager.create',
|
||||
action: 'plugins::content-manager.explorer.create',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
},
|
||||
{
|
||||
action: 'plugins::content-manager.update',
|
||||
action: 'plugins::content-manager.explorer.update',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
},
|
||||
{
|
||||
action: 'plugins::content-manager.delete',
|
||||
action: 'plugins::content-manager.explorer.delete',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
},
|
||||
{
|
||||
action: 'plugins::content-manager.read',
|
||||
action: 'plugins::content-manager.explorer.read',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['isOwner'],
|
||||
@ -586,7 +586,7 @@ describe('Role CRUD End to End', () => {
|
||||
action: 'plugins::users-permissions.roles.update',
|
||||
},
|
||||
{
|
||||
action: 'plugins::content-manager.create',
|
||||
action: 'plugins::content-manager.explorer.create',
|
||||
subject: 'plugins::users-permissions.user',
|
||||
fields: ['username'],
|
||||
conditions: ['admin::is-creator'],
|
||||
|
||||
@ -10,10 +10,10 @@ const handleReject = error => Promise.reject(formatYupErrors(error));
|
||||
// validatedUpdatePermissionsInput
|
||||
|
||||
const BOUND_ACTIONS = [
|
||||
'plugins::content-manager.read',
|
||||
'plugins::content-manager.create',
|
||||
'plugins::content-manager.update',
|
||||
'plugins::content-manager.delete',
|
||||
'plugins::content-manager.explorer.read',
|
||||
'plugins::content-manager.explorer.create',
|
||||
'plugins::content-manager.explorer.update',
|
||||
'plugins::content-manager.explorer.delete',
|
||||
];
|
||||
|
||||
const checkBoundActionsHaveFields = function(permissions) {
|
||||
|
||||
@ -98,28 +98,28 @@ const registerPermissions = () => {
|
||||
{
|
||||
section: 'contentTypes',
|
||||
displayName: 'Create',
|
||||
uid: 'create',
|
||||
uid: 'explorer.create',
|
||||
pluginName: 'content-manager',
|
||||
subjects: contentTypesUids,
|
||||
},
|
||||
{
|
||||
section: 'contentTypes',
|
||||
displayName: 'Read',
|
||||
uid: 'read',
|
||||
uid: 'explorer.read',
|
||||
pluginName: 'content-manager',
|
||||
subjects: contentTypesUids,
|
||||
},
|
||||
{
|
||||
section: 'contentTypes',
|
||||
displayName: 'Update',
|
||||
uid: 'update',
|
||||
uid: 'explorer.update',
|
||||
pluginName: 'content-manager',
|
||||
subjects: contentTypesUids,
|
||||
},
|
||||
{
|
||||
section: 'contentTypes',
|
||||
displayName: 'Delete',
|
||||
uid: 'delete',
|
||||
uid: 'explorer.delete',
|
||||
pluginName: 'content-manager',
|
||||
subjects: contentTypesUids,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user