Skip to content

Commit

Permalink
Add permission to CTB routes
Browse files Browse the repository at this point in the history
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
  • Loading branch information
Convly committed Oct 22, 2020
1 parent 4d00bc0 commit 15e8a76
Showing 1 changed file with 42 additions and 14 deletions.
56 changes: 42 additions & 14 deletions packages/strapi-plugin-content-type-builder/config/routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,111 +5,139 @@
"path": "/reserved-names",
"handler": "Builder.getReservedNames",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "GET",
"path": "/connections",
"handler": "Connections.getConnections",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "GET",
"path": "/content-types",
"handler": "ContentTypes.getContentTypes",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "GET",
"path": "/content-types/:uid",
"handler": "ContentTypes.getContentType",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "POST",
"path": "/content-types",
"handler": "ContentTypes.createContentType",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "PUT",
"path": "/content-types/:uid",
"handler": "ContentTypes.updateContentType",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "DELETE",
"path": "/content-types/:uid",
"handler": "ContentTypes.deleteContentType",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "GET",
"path": "/components",
"handler": "Components.getComponents",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "GET",
"path": "/components/:uid",
"handler": "Components.getComponent",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "POST",
"path": "/components",
"handler": "Components.createComponent",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "PUT",
"path": "/components/:uid",
"handler": "Components.updateComponent",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "DELETE",
"path": "/components/:uid",
"handler": "Components.deleteComponent",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "PUT",
"path": "/component-categories/:name",
"handler": "ComponentCategories.editCategory",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
},
{
"method": "DELETE",
"path": "/component-categories/:name",
"handler": "ComponentCategories.deleteCategory",
"config": {
"policies": []
"policies": [
["admin::hasPermissions", ["plugins::content-type-builder.read"]]
]
}
}
]
Expand Down

0 comments on commit 15e8a76

Please sign in to comment.