Skip to content

feat: add organization details to audit log response #13961

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 6 commits into from
Jul 22, 2024

Conversation

code-asher
Copy link
Member

@code-asher code-asher commented Jul 19, 2024

This is so the frontend will be able to display the organization name in the audit log row.

I added MinimalOrganization to mirror MinimalUser. It will be omitted if there was no organization, which I felt made more sense in the frontend (rather than the uuid zero value), but I can change that back if we want.

This new object replaces the old organization ID property on audit logs. Technically a breaking change? But we were not using it and I doubt anyone else was.

This is explained in the commit message, but params.OrganizationID == uuid.Nil was removed from the test audit log creation so I could test audit logs without an org.

Part 1 of #13913

Not all audit entries have organization IDs, so this will allow us to
test those cases.
@code-asher code-asher changed the title Add organization details to audit logs feat: add organization details to audit logs Jul 19, 2024
@code-asher code-asher force-pushed the asher/audit-log-orgs branch 3 times, most recently from 6f4b6bf to 8740626 Compare July 19, 2024 23:54
This replaces the old ID.  This is a breaking change but organizations
were not being used before.
@code-asher code-asher force-pushed the asher/audit-log-orgs branch from 8740626 to 2b25f46 Compare July 20, 2024 00:06
@code-asher code-asher requested a review from Emyrk July 20, 2024 00:32
There is another test called "organizations" so this distinguishes that
this is checking the response itself contains this field.  Rename the
user test to match.
@code-asher code-asher force-pushed the asher/audit-log-orgs branch from ebaa981 to 755d189 Compare July 22, 2024 21:08
But mark it as deprecated.
@code-asher code-asher force-pushed the asher/audit-log-orgs branch from 755d189 to de75d4f Compare July 22, 2024 21:09
@code-asher code-asher changed the title feat: add organization details to audit logs feat: add organization details to audit log response Jul 22, 2024
@code-asher code-asher merged commit a8e6e89 into main Jul 22, 2024
39 checks passed
@code-asher code-asher deleted the asher/audit-log-orgs branch July 22, 2024 21:28
@github-actions github-actions bot locked and limited conversation to collaborators Jul 22, 2024
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.

2 participants