fix project id is recorded as part of cluster related auditlogs (#128)

Signed-off-by: niravparikh05 <nir.parikh05@gmail.com>
This commit is contained in:
Nirav Parikh
2023-01-27 18:44:19 +05:30
committed by GitHub
parent 1f64d80729
commit 80f7a148b0
2 changed files with 10 additions and 0 deletions
+3
View File
@@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
## Unreleased
## Fixed
- Fix project id is recorded as part of cluster related auditlogs from [niravparikh05](https://github.com/niravparikh05)
## Added
- Enhance: Ability to set auto generated password during installation and force reset during first login [mabhi](https://github.com/mabhi)
+7
View File
@@ -596,6 +596,13 @@ func (s *clusterService) Update(ctx context.Context, cluster *infrav3.Cluster) (
h.OnChange(ev)
}*/
if id, err := uuid.Parse(projectName); err == nil {
projectName, err = dao.GetProjectName(ctx, s.db, id)
if err != nil {
return nil, err
}
}
CreateClusterAuditEvent(ctx, s.al, AuditActionUpdate, cluster.GetMetadata().GetName(), cdb.ID, projectName)
return cluster, nil