Added API to return user count bands and user count (#25796)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
cac50f593b
Коммит
a59f5ccded
@@ -51,6 +51,7 @@ build-v4: node_modules playbooks
|
||||
@cat $(V4_SRC)/exports.yaml >> $(V4_YAML)
|
||||
@cat $(V4_SRC)/ip_filters.yaml >> $(V4_YAML)
|
||||
@cat $(V4_SRC)/reports.yaml >> $(V4_YAML)
|
||||
@cat $(V4_SRC)/limits.yaml >> $(V4_YAML)
|
||||
@if [ -r $(PLAYBOOKS_SRC)/paths.yaml ]; then cat $(PLAYBOOKS_SRC)/paths.yaml >> $(V4_YAML); fi
|
||||
@if [ -r $(PLAYBOOKS_SRC)/merged-definitions.yaml ]; then cat $(PLAYBOOKS_SRC)/merged-definitions.yaml >> $(V4_YAML); else cat $(V4_SRC)/definitions.yaml >> $(V4_YAML); fi
|
||||
@echo Extracting code samples
|
||||
|
||||
@@ -3569,6 +3569,25 @@ components:
|
||||
state:
|
||||
description: The current state of the installation
|
||||
type: string
|
||||
UserLimits:
|
||||
type: object
|
||||
properties:
|
||||
maxUsersLimit:
|
||||
description: The maximum number of users allowed on server
|
||||
type: integer
|
||||
format: int64
|
||||
lowerBandUserLimit:
|
||||
description: User count after which to show the first upgrade message
|
||||
type: integer
|
||||
format: int64
|
||||
upperBandUserLimit:
|
||||
description: User count after which to show the second upgrade message
|
||||
type: integer
|
||||
format: int64
|
||||
activeUserCount:
|
||||
description: The number of active users in the server
|
||||
type: integer
|
||||
format: int64
|
||||
externalDocs:
|
||||
description: Find out more about Mattermost
|
||||
url: 'https://about.mattermost.com'
|
||||
|
||||
30
api/v4/source/limits.yaml
Обычный файл
30
api/v4/source/limits.yaml
Обычный файл
@@ -0,0 +1,30 @@
|
||||
/api/v4/limits/users:
|
||||
get:
|
||||
tags:
|
||||
- users
|
||||
summary: Gets the user limits for the server
|
||||
description: >
|
||||
Gets the user limits for the server
|
||||
|
||||
##### Permissions
|
||||
|
||||
Requires `sysconsole_read_user_management_users`.
|
||||
|
||||
operationId: getUserLimits
|
||||
responses:
|
||||
"200":
|
||||
description: User limits for server
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/UserLimits"
|
||||
"400":
|
||||
$ref: "#/components/responses/BadRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"403":
|
||||
$ref: "#/components/responses/Forbidden"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalServerError"
|
||||
Ссылка в новой задаче
Block a user