MM-52638- Last admin cannot be demoted (#24087)
* don't allow last sysadmin to change roles * cleanup, add comment * only allow admin downgrade if more than one admin * remove unused variable * i18n-extract, unit test fixes * Update user.go * remove blank line * update tests check all return values * revert channel_store.go --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
72644e72f6
Коммит
b788760e17
@@ -6846,6 +6846,10 @@
|
||||
"id": "app.user.store_is_empty.app_error",
|
||||
"translation": "Failed to check if user store is empty."
|
||||
},
|
||||
{
|
||||
"id": "app.user.update.countAdmins.app_error",
|
||||
"translation": "Error determining number of System Admin accounts."
|
||||
},
|
||||
{
|
||||
"id": "app.user.update.find.app_error",
|
||||
"translation": "Unable to find the existing account to update."
|
||||
@@ -6854,6 +6858,10 @@
|
||||
"id": "app.user.update.finding.app_error",
|
||||
"translation": "We encountered an error finding the account."
|
||||
},
|
||||
{
|
||||
"id": "app.user.update.lastAdmin.app_error",
|
||||
"translation": "Cannot demote last System Admin."
|
||||
},
|
||||
{
|
||||
"id": "app.user.update_active.user_limit.exceeded",
|
||||
"translation": "Can't activate user. Server exceeds safe user limit. Contact your administrator with: ERROR_SAFETY_LIMITS_EXCEEDED."
|
||||
|
||||
Ссылка в новой задаче
Block a user