Add password generation UI profile workflow

This commit is contained in:
Joe Julian
2026-03-29 11:21:10 -07:00
parent 2b535a90e4
commit ed1e2c3e6b
8 changed files with 186 additions and 77 deletions
+3 -3
View File
@@ -605,9 +605,9 @@ func (s *Server) GeneratePassword(_ context.Context, req *keepassgov1.GeneratePa
return nil, status.Error(codes.FailedPrecondition, "vault is locked")
}
profile, ok := s.profiles[req.GetProfile()]
if !ok {
return nil, status.Errorf(codes.InvalidArgument, "unknown password profile %q", req.GetProfile())
profile, err := passwords.LookupProfile(req.GetProfile(), s.profiles)
if err != nil {
return nil, status.Error(codes.InvalidArgument, err.Error())
}
password, err := passwords.Generate(profile)