rename fodler->namespace for perms

This commit is contained in:
Domas committed 2021-02-19 12:36:05 +02:00
1 parent 29b3354e4d
commit b4a23f00cb
3 files changed
+54 -55

No files matched your search

-42
View File
@@ -1,42 +0,0 @@
// swagger:route GET /api/v1/folder/{Id}/permissions folders RouteGetFolderPermissions
//
// sets an Alerting config
//
// Responses:
// 200: Permissions
// 400: ValidationError
// swagger:route POST /api/v1/folder/{Id}/permissions folders RouteSetFolderPermissions
//
// gets an Alerting config
//
// Responses:
// 201: Ack
// 400: ValidationError
package api
import (
"github.com/grafana/grafana/pkg/api/dtos"
)
// swagger:model
type Permissions []dtos.UpdateDashboardAclCommand
// swagger:parameters RouteGetFolderPermissions
type GetFolderPermsEndpointParams struct {
// Id of a folder
// in: path
Id string
}
// swagger:parameters RouteSetFolderPermissions
type SetFolderPermsEndpointParams struct {
// Id of a folder
// in: path
Id string
// New folder permissions
// in: body
Body Permissions
}
+42
View File
@@ -0,0 +1,42 @@
// swagger:route GET /api/v1/namespace/{Namespace}/permissions permissions RouteGetNamespacePermissions
//
// sets an Alerting config
//
// Responses:
// 200: Permissions
// 400: ValidationError
// swagger:route POST /api/v1/namespace/{Namespace}/permissions permissions RouteSetNamespacePermissions
//
// gets an Alerting config
//
// Responses:
// 201: Ack
// 400: ValidationError
package api
import (
"github.com/grafana/grafana/pkg/api/dtos"
)
// swagger:model
type Permissions []dtos.UpdateDashboardAclCommand
// swagger:parameters RouteGetNamespacePermissions
type GetNamespacePermsEndpointParams struct {
// Namespace name
// in: path
Namespace string
}
// swagger:parameters RouteSetNamespacePermissions
type SetNamespacePermsEndpointParams struct {
// Namespace name to apply perms to
// in: path
Namespace string
// New namespace permissions
// in: body
Body Permissions
}
+12 -13
View File
@@ -222,18 +222,18 @@
}
}
},
"/api/v1/folder/{Id}/permissions": {
"/api/v1/namespace/{Namespace}/permissions": {
"get": {
"description": "sets an Alerting config",
"tags": [
"folders"
"permissions"
],
"operationId": "RouteGetFolderPermissions",
"operationId": "RouteGetNamespacePermissions",
"parameters": [
{
"type": "string",
"description": "Id of a folder",
"name": "Id",
"description": "Namespace name",
"name": "Namespace",
"in": "path",
"required": true
}
@@ -256,19 +256,19 @@
"post": {
"description": "gets an Alerting config",
"tags": [
"folders"
"permissions"
],
"operationId": "RouteSetFolderPermissions",
"operationId": "RouteSetNamespacePermissions",
"parameters": [
{
"type": "string",
"description": "Id of a folder",
"name": "Id",
"description": "Namespace name to apply perms to",
"name": "Namespace",
"in": "path",
"required": true
},
{
"description": "New folder permissions",
"description": "New namespace permissions",
"name": "Body",
"in": "body",
"schema": {
@@ -1784,9 +1784,8 @@
"x-go-package": "github.com/prometheus/common/config"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"type": "object",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"properties": {
"ForceQuery": {
"type": "boolean"
@@ -1819,7 +1818,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"x-go-package": "net/url"
"x-go-package": "github.com/prometheus/common/config"
},
"UpdateDashboardAclCommand": {
"type": "object",