prevent changing a provisioned user's password

This commit is contained in:
Hunter Kehoe
2025-08-03 16:07:24 -06:00
parent 15a7f86344
commit 81463614c9
8 changed files with 54 additions and 12 deletions

View File

@@ -1209,6 +1209,9 @@ func TestManager_WithProvisionedUsers(t *testing.T) {
require.Equal(t, "tk_u48wqendnkx9er21pqqcadlytbutx", tokens[1].Value)
require.Equal(t, "Another token", tokens[1].Label)
// Try changing provisioned user's password
require.Error(t, a.ChangePassword("philuser", "new-pass", false))
// Re-open the DB again (third app start)
require.Nil(t, a.db.Close())
conf.Users = []*User{}