mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(swagger): POST -> GET method for two access control endpoints (#80082)
Missed those here: https://github.com/grafana/grafana/pull/80053
This commit is contained in:
parent
7587c403c4
commit
c7f515b9b2
@ -82,7 +82,7 @@ type Description struct {
|
||||
Permissions []string `json:"permissions"`
|
||||
}
|
||||
|
||||
// swagger:route POST /access-control/{resource}/description access_control getResourceDescription
|
||||
// swagger:route GET /access-control/{resource}/description access_control getResourceDescription
|
||||
//
|
||||
// Get a description of a resource's access control properties.
|
||||
//
|
||||
@ -128,7 +128,7 @@ type GetResourcePermissionsParams struct {
|
||||
// swagger:response getResourcePermissionsResponse
|
||||
type getResourcePermissionsResponse []resourcePermissionDTO
|
||||
|
||||
// swagger:route POST /access-control/{resource}/{resourceID} access_control getResourcePermissions
|
||||
// swagger:route GET /access-control/{resource}/{resourceID} access_control getResourcePermissions
|
||||
//
|
||||
// Get permissions for a resource.
|
||||
//
|
||||
|
@ -710,7 +710,7 @@
|
||||
}
|
||||
},
|
||||
"/access-control/{resource}/description": {
|
||||
"post": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"access_control"
|
||||
],
|
||||
@ -738,6 +738,38 @@
|
||||
}
|
||||
},
|
||||
"/access-control/{resource}/{resourceID}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"access_control"
|
||||
],
|
||||
"summary": "Get permissions for a resource.",
|
||||
"operationId": "getResourcePermissions",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "resource",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"name": "resourceID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/getResourcePermissionsResponse"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/responses/forbiddenError"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/responses/internalServerError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to one or many\nassignment types. Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.",
|
||||
"tags": [
|
||||
|
@ -13173,7 +13173,7 @@
|
||||
}
|
||||
},
|
||||
"/access-control/{resource}/description": {
|
||||
"post": {
|
||||
"get": {
|
||||
"operationId": "getResourceDescription",
|
||||
"parameters": [
|
||||
{
|
||||
@ -13203,6 +13203,42 @@
|
||||
}
|
||||
},
|
||||
"/access-control/{resource}/{resourceID}": {
|
||||
"get": {
|
||||
"operationId": "getResourcePermissions",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "resource",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "resourceID",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/components/responses/getResourcePermissionsResponse"
|
||||
},
|
||||
"403": {
|
||||
"$ref": "#/components/responses/forbiddenError"
|
||||
},
|
||||
"500": {
|
||||
"$ref": "#/components/responses/internalServerError"
|
||||
}
|
||||
},
|
||||
"summary": "Get permissions for a resource.",
|
||||
"tags": [
|
||||
"access_control"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"description": "Assigns permissions for a resource by a given type (`:resource`) and `:resourceID` to one or many\nassignment types. Allowed resources are `datasources`, `teams`, `dashboards`, `folders`, and `serviceaccounts`.\nRefer to the `/access-control/{resource}/description` endpoint for allowed Permissions.",
|
||||
"operationId": "setResourcePermissions",
|
||||
|
Loading…
Reference in New Issue
Block a user