Support for special characters and remove buggy functions (#1977)

- remove the use of encodeURI and encodeURIComponent functions and
  instead use encodeFileName and decodeFileName functions
- support for users with special characters
- support for users with special characters
- support for users with special characters
- fixed incorrectly group list display for policies

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
Lenin Alevski
2022-05-13 13:13:56 -07:00
committed by GitHub
parent bd63817e37
commit 1532cc0e70
81 changed files with 666 additions and 555 deletions

View File

@@ -2617,7 +2617,7 @@ func init() {
}
}
},
"/group": {
"/group/{name}": {
"get": {
"tags": [
"Group"
@@ -2628,7 +2628,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -2657,7 +2657,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
},
{
@@ -2694,7 +2694,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -3139,7 +3139,7 @@ func init() {
}
}
},
"/policy": {
"/policy/{name}": {
"get": {
"tags": [
"Policy"
@@ -3150,7 +3150,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -3179,7 +3179,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -3843,7 +3843,30 @@ func init() {
}
}
},
"/user": {
"/user/policy": {
"get": {
"tags": [
"Policy"
],
"summary": "returns policies for logged in user",
"operationId": "GetUserPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "string"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}": {
"get": {
"tags": [
"User"
@@ -3854,7 +3877,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -3883,7 +3906,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
},
{
@@ -3920,7 +3943,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -3937,7 +3960,7 @@ func init() {
}
}
},
"/user/groups": {
"/user/{name}/groups": {
"put": {
"tags": [
"User"
@@ -3948,7 +3971,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
},
{
@@ -3976,29 +3999,6 @@ func init() {
}
}
},
"/user/policy": {
"get": {
"tags": [
"Policy"
],
"summary": "returns policies for logged in user",
"operationId": "GetUserPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "string"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}/service-account-credentials": {
"post": {
"tags": [
@@ -9565,7 +9565,7 @@ func init() {
}
}
},
"/group": {
"/group/{name}": {
"get": {
"tags": [
"Group"
@@ -9576,7 +9576,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -9605,7 +9605,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
},
{
@@ -9642,7 +9642,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -10087,7 +10087,7 @@ func init() {
}
}
},
"/policy": {
"/policy/{name}": {
"get": {
"tags": [
"Policy"
@@ -10098,7 +10098,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -10127,7 +10127,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -10791,7 +10791,30 @@ func init() {
}
}
},
"/user": {
"/user/policy": {
"get": {
"tags": [
"Policy"
],
"summary": "returns policies for logged in user",
"operationId": "GetUserPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "string"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}": {
"get": {
"tags": [
"User"
@@ -10802,7 +10825,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -10831,7 +10854,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
},
{
@@ -10868,7 +10891,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
}
],
@@ -10885,7 +10908,7 @@ func init() {
}
}
},
"/user/groups": {
"/user/{name}/groups": {
"put": {
"tags": [
"User"
@@ -10896,7 +10919,7 @@ func init() {
{
"type": "string",
"name": "name",
"in": "query",
"in": "path",
"required": true
},
{
@@ -10924,29 +10947,6 @@ func init() {
}
}
},
"/user/policy": {
"get": {
"tags": [
"Policy"
],
"summary": "returns policies for logged in user",
"operationId": "GetUserPolicy",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "string"
}
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/user/{name}/service-account-credentials": {
"post": {
"tags": [