Only use the necessary HTTP methods for default permissions

This commit is contained in:
Jeremy Grossmann authored and GitHub committed 2021-08-17 23:47:32 +09:30
1 parent 4c6135fe88
commit 1a5fb1abcc
1 file changed
+4 -4
+4 -4
View File
@@ -53,19 +53,19 @@ def create_default_roles(target, connection, **kw):
default_permissions = [
{
"description": "Allow access to all endpoints",
"methods": ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH"],
"methods": ["GET", "POST", "PUT", "DELETE"],
"path": "/",
"action": "ALLOW"
},
{
"description": "Allow to create and list projects",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET", "POST"],
"path": "/projects",
"action": "ALLOW"
},
{
"description": "Allow to create and list templates",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET", "POST"],
"path": "/templates",
"action": "ALLOW"
},
@@ -77,7 +77,7 @@ def create_default_roles(target, connection, **kw):
},
{
"description": "Allow access to all symbol endpoints",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET", "POST"],
"path": "/symbols/*",
"action": "ALLOW"
},