Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: allow organization name or uuid for audit log searching#13721

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 2 commits intomainfromstevenmasley/organization_name_audit_filter
Jun 28, 2024

Conversation

Emyrk
Copy link
Member

@EmyrkEmyrk commentedJun 28, 2024
edited
Loading

What this does

Allows using organization name in theorganization filter for audit log searching.

@EmyrkEmyrk marked this pull request as ready for reviewJune 28, 2024 14:44
@EmyrkEmyrk requested a review fromjohnstcnJune 28, 2024 14:48
Copy link
Member

@johnstcnjohnstcn left a comment

Choose a reason for hiding this comment

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

I don't think we should remove the existing ability to query byorganization_id.

@@ -177,13 +177,48 @@ func TestAuditLogs(t *testing.T) {

// Using the organization selector allows the org admin to fetch audit logs
alogs, err := orgAdmin.AuditLogs(ctx, codersdk.AuditLogsRequest{
SearchQuery: fmt.Sprintf("organization_id:%s", owner.OrganizationID.String()),
Copy link
Member

@johnstcnjohnstcnJun 28, 2024
edited
Loading

Choose a reason for hiding this comment

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

we should continue testing that searching byorganization_id works

EDIT: undocumented feature

Comment on lines +57 to +60
} else {
// Organization could be a name
organization, err := db.GetOrganizationByName(ctx, organizationArg)
if err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

ah my bad, I fixated on line 33 but missed this check 👍

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yea, I use the same query param oforganization. Feels more straight forward

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Might be worth adding some sort of error if you useorganization_id to suggest usingorganization.

Note that this param is not documented or used anywhere yet.

Copy link
Member

Choose a reason for hiding this comment

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

Only problem is this might break existing queries, idk if any folks would have a reason to use this yet?

Copy link
Member

Choose a reason for hiding this comment

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

Note that this param is not documented or used anywhere yet.

Ah, if it's not documented then all bets are off.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yea, I added it 2 days ago, and intentionally am not documenting any of the multi-org stuff yet:#13663

johnstcn reacted with thumbs up emoji
@EmyrkEmyrk merged commit6daf330 intomainJun 28, 2024
31 checks passed
@EmyrkEmyrk deleted the stevenmasley/organization_name_audit_filter branchJune 28, 2024 15:01
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 28, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@johnstcnjohnstcnjohnstcn approved these changes

Assignees

@EmyrkEmyrk

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@Emyrk@johnstcn

[8]ページ先頭

©2009-2025 Movatter.jp