[MM-37108] Fix possible nil dereference in team edition (#17933)
* Fix possible nil dereference * Fix translation * Switch to StatusForbidden Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
186475db3b
Коммит
75d6480393
@@ -229,4 +229,12 @@ func TestRequestTrialLicense(t *testing.T) {
|
||||
require.Equal(t, "api.license.add_license.unique_users.app_error", resp.Error.Id)
|
||||
require.False(t, ok)
|
||||
})
|
||||
|
||||
th.App.Srv().LicenseManager = nil
|
||||
t.Run("trial license should fail if LicenseManager is nil", func(t *testing.T) {
|
||||
ok, resp := th.SystemAdminClient.RequestTrialLicense(1)
|
||||
CheckForbiddenStatus(t, resp)
|
||||
require.False(t, ok)
|
||||
require.Equal(t, "api.license.upgrade_needed.app_error", resp.Error.Id)
|
||||
})
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user