[MM-25645] api4/user: add migrate_auth endpoints (#14966)
* api4/user: add migrate_auth endpoints * api4/user: reflect review comments * add translations Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f12ca27bac
Коммит
c30fea5f2d
@@ -5182,3 +5182,29 @@ func TestConvertUserToBot(t *testing.T) {
|
||||
require.NotNil(t, bot)
|
||||
})
|
||||
}
|
||||
|
||||
func TestMigrateAuthToLDAP(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
_, err := th.Client.MigrateAuthToLdap("email", "a", false)
|
||||
CheckForbiddenStatus(t, err)
|
||||
|
||||
th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) {
|
||||
_, err = client.MigrateAuthToLdap("email", "a", false)
|
||||
CheckNotImplementedStatus(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
func TestMigrateAuthToSAML(t *testing.T) {
|
||||
th := Setup(t).InitBasic()
|
||||
defer th.TearDown()
|
||||
|
||||
_, err := th.Client.MigrateAuthToSaml("email", map[string]string{"1": "a"}, true)
|
||||
CheckForbiddenStatus(t, err)
|
||||
|
||||
th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) {
|
||||
_, err = client.MigrateAuthToSaml("email", map[string]string{"1": "a"}, true)
|
||||
CheckNotImplementedStatus(t, err)
|
||||
})
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user