Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: audit log workspace build URL should form with the correct workspace owner #5674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 12, 2023

Conversation

Kira-Pilot
Copy link
Member

Resolves #5673
Build URL was incorrect when admin started a workspace for which they were not an owner.

Before:
Kapture 2023-01-11 at 12 27 22

After:
Kapture 2023-01-11 at 12 38 29

workspaceOwner, getWorkspaceOwnerErr := api.Database.GetUserByID(ctx, workspace.OwnerID)
if getWorkspaceOwnerErr != nil {
return ""
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love it, but idk how else to get workspace owner. I don't want to pass everything through additionalFields because that will not fix old records.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I might change the hyperlink to be on the build # instead.

Having it on the workspace name makes me think it'll link me to the workspace.

@Kira-Pilot
Copy link
Member Author

@kylecarbs I can look at that in a follow-up PR!

@Kira-Pilot Kira-Pilot closed this Jan 12, 2023
@Kira-Pilot Kira-Pilot reopened this Jan 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2023
@kylecarbs
Copy link
Member

@Kira-Pilot awesome! And thanks for putting up with my slow review!

@Kira-Pilot Kira-Pilot merged commit 575bfab into main Jan 12, 2023
@Kira-Pilot Kira-Pilot deleted the workspace-build-link-fix/kira-pilot branch January 12, 2023 14:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Audit Log: Build URL is incorrect when admin starts workspace for which they are not an owner
2 participants