upd(system): add Permissions API
This commit is contained in:
@@ -679,95 +679,5 @@
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"title": "Permissions",
|
||||
"parameters": {},
|
||||
"entrypoint": "permissions",
|
||||
"path": "/permissions",
|
||||
"authentication": [
|
||||
"Client ID",
|
||||
"Session ID"
|
||||
],
|
||||
"struct": [
|
||||
{
|
||||
"imports": [
|
||||
"github.com/crusttech/crust/internal/rules"
|
||||
]
|
||||
}
|
||||
],
|
||||
"apis": [
|
||||
{
|
||||
"name": "list",
|
||||
"path": "/",
|
||||
"method": "GET",
|
||||
"title": "List default permissions",
|
||||
"parameters": {}
|
||||
},
|
||||
{
|
||||
"name": "get",
|
||||
"path": "/{teamID}",
|
||||
"method": "GET",
|
||||
"title": "Retrieve current permission settings",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
"name": "teamID",
|
||||
"type": "uint64",
|
||||
"required": true,
|
||||
"title": "Team ID"
|
||||
}
|
||||
],
|
||||
"get": [
|
||||
{
|
||||
"name": "resource",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"title": "Permissions resource"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "set",
|
||||
"path": "/{teamID}",
|
||||
"method": "POST",
|
||||
"title": "Update permission settings",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
"name": "teamID",
|
||||
"type": "uint64",
|
||||
"required": true,
|
||||
"title": "Team ID"
|
||||
}
|
||||
],
|
||||
"post": [
|
||||
{
|
||||
"name": "permissions",
|
||||
"type": "[]rules.Rules",
|
||||
"required": true,
|
||||
"title": "List of rules to set"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "scopes",
|
||||
"path": "/scopes/{scope}",
|
||||
"method": "GET",
|
||||
"title": "List resources for given scope",
|
||||
"parameters": {
|
||||
"path": [
|
||||
{
|
||||
"name": "scope",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"title": "Scope"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
{
|
||||
"Title": "Permissions",
|
||||
"Interface": "Permissions",
|
||||
"Struct": [
|
||||
{
|
||||
"imports": [
|
||||
"github.com/crusttech/crust/internal/rules"
|
||||
]
|
||||
}
|
||||
],
|
||||
"Parameters": {},
|
||||
"Protocol": "",
|
||||
"Authentication": [
|
||||
"Client ID",
|
||||
"Session ID"
|
||||
],
|
||||
"Path": "/permissions",
|
||||
"APIs": [
|
||||
{
|
||||
"Name": "list",
|
||||
"Method": "GET",
|
||||
"Title": "List default permissions",
|
||||
"Path": "/",
|
||||
"Parameters": {}
|
||||
},
|
||||
{
|
||||
"Name": "get",
|
||||
"Method": "GET",
|
||||
"Title": "Retrieve current permission settings",
|
||||
"Path": "/{teamID}",
|
||||
"Parameters": {
|
||||
"get": [
|
||||
{
|
||||
"name": "resource",
|
||||
"required": true,
|
||||
"title": "Permissions resource",
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"path": [
|
||||
{
|
||||
"name": "teamID",
|
||||
"required": true,
|
||||
"title": "Team ID",
|
||||
"type": "uint64"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "set",
|
||||
"Method": "POST",
|
||||
"Title": "Update permission settings",
|
||||
"Path": "/{teamID}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
"name": "teamID",
|
||||
"required": true,
|
||||
"title": "Team ID",
|
||||
"type": "uint64"
|
||||
}
|
||||
],
|
||||
"post": [
|
||||
{
|
||||
"name": "permissions",
|
||||
"required": true,
|
||||
"title": "List of rules to set",
|
||||
"type": "[]rules.Rules"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"Name": "scopes",
|
||||
"Method": "GET",
|
||||
"Title": "List resources for given scope",
|
||||
"Path": "/scopes/{scope}",
|
||||
"Parameters": {
|
||||
"path": [
|
||||
{
|
||||
"name": "scope",
|
||||
"required": true,
|
||||
"title": "Scope",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user