mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
Add permission to CTB routes
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
This commit is contained in:
parent
4d00bc09b8
commit
15e8a76f11
@ -5,7 +5,9 @@
|
|||||||
"path": "/reserved-names",
|
"path": "/reserved-names",
|
||||||
"handler": "Builder.getReservedNames",
|
"handler": "Builder.getReservedNames",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -13,7 +15,9 @@
|
|||||||
"path": "/connections",
|
"path": "/connections",
|
||||||
"handler": "Connections.getConnections",
|
"handler": "Connections.getConnections",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -21,7 +25,9 @@
|
|||||||
"path": "/content-types",
|
"path": "/content-types",
|
||||||
"handler": "ContentTypes.getContentTypes",
|
"handler": "ContentTypes.getContentTypes",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -29,7 +35,9 @@
|
|||||||
"path": "/content-types/:uid",
|
"path": "/content-types/:uid",
|
||||||
"handler": "ContentTypes.getContentType",
|
"handler": "ContentTypes.getContentType",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -37,7 +45,9 @@
|
|||||||
"path": "/content-types",
|
"path": "/content-types",
|
||||||
"handler": "ContentTypes.createContentType",
|
"handler": "ContentTypes.createContentType",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -45,7 +55,9 @@
|
|||||||
"path": "/content-types/:uid",
|
"path": "/content-types/:uid",
|
||||||
"handler": "ContentTypes.updateContentType",
|
"handler": "ContentTypes.updateContentType",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -53,7 +65,9 @@
|
|||||||
"path": "/content-types/:uid",
|
"path": "/content-types/:uid",
|
||||||
"handler": "ContentTypes.deleteContentType",
|
"handler": "ContentTypes.deleteContentType",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -61,7 +75,9 @@
|
|||||||
"path": "/components",
|
"path": "/components",
|
||||||
"handler": "Components.getComponents",
|
"handler": "Components.getComponents",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -69,7 +85,9 @@
|
|||||||
"path": "/components/:uid",
|
"path": "/components/:uid",
|
||||||
"handler": "Components.getComponent",
|
"handler": "Components.getComponent",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -77,7 +95,9 @@
|
|||||||
"path": "/components",
|
"path": "/components",
|
||||||
"handler": "Components.createComponent",
|
"handler": "Components.createComponent",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -85,7 +105,9 @@
|
|||||||
"path": "/components/:uid",
|
"path": "/components/:uid",
|
||||||
"handler": "Components.updateComponent",
|
"handler": "Components.updateComponent",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -93,7 +115,9 @@
|
|||||||
"path": "/components/:uid",
|
"path": "/components/:uid",
|
||||||
"handler": "Components.deleteComponent",
|
"handler": "Components.deleteComponent",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,7 +125,9 @@
|
|||||||
"path": "/component-categories/:name",
|
"path": "/component-categories/:name",
|
||||||
"handler": "ComponentCategories.editCategory",
|
"handler": "ComponentCategories.editCategory",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -109,7 +135,9 @@
|
|||||||
"path": "/component-categories/:name",
|
"path": "/component-categories/:name",
|
||||||
"handler": "ComponentCategories.deleteCategory",
|
"handler": "ComponentCategories.deleteCategory",
|
||||||
"config": {
|
"config": {
|
||||||
"policies": []
|
"policies": [
|
||||||
|
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user