Added bulk functionality for add users to groups (#68)

Added functionality in users module to add multiple users to multiple groups at once.

Co-authored-by: Benjamin Perez <benjamin@bexsoft.net>
This commit is contained in:
Alex
2020-04-15 20:08:35 -05:00
committed by GitHub
parent 82ea3c1ac4
commit 540ff31784
18 changed files with 1397 additions and 41 deletions

View File

@@ -1096,6 +1096,36 @@ func init() {
}
}
},
"/users-groups-bulk": {
"put": {
"tags": [
"AdminAPI"
],
"summary": "Bulk functionality to Add Users to Groups",
"operationId": "BulkUpdateUsersGroups",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/bulkUserGroups"
}
}
],
"responses": {
"200": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/users/{name}": {
"get": {
"tags": [
@@ -1356,6 +1386,27 @@ func init() {
}
}
},
"bulkUserGroups": {
"type": "object",
"required": [
"users",
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"type": "string"
}
},
"users": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"configDescription": {
"type": "object",
"properties": {
@@ -2948,6 +2999,36 @@ func init() {
}
}
},
"/users-groups-bulk": {
"put": {
"tags": [
"AdminAPI"
],
"summary": "Bulk functionality to Add Users to Groups",
"operationId": "BulkUpdateUsersGroups",
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/bulkUserGroups"
}
}
],
"responses": {
"200": {
"description": "A successful response."
},
"default": {
"description": "Generic error response.",
"schema": {
"$ref": "#/definitions/error"
}
}
}
}
},
"/users/{name}": {
"get": {
"tags": [
@@ -3208,6 +3289,27 @@ func init() {
}
}
},
"bulkUserGroups": {
"type": "object",
"required": [
"users",
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"type": "string"
}
},
"users": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"configDescription": {
"type": "object",
"properties": {