Skip to content

fix: api key created by sys admin cannot write data #2114

@hvn2k1

Description

@hvn2k1

Version

v2.0.0

Describe the bug

API key created by system admin cannot write data due to get account function is the getAccountByEnvironmentID API:

resp, err := getAccountFunc(publicAPIEditor.Maintainer)
if err != nil {
return nil, err
}

usage ref:

bucketeer/pkg/push/api/api.go

Lines 1271 to 1274 in a6c5494

resp, err := s.accountClient.GetAccountV2ByEnvironmentID(ctx, &accountproto.GetAccountV2ByEnvironmentIDRequest{
Email: email,
EnvironmentId: environmentId,
})

Example: this is called when we try to create a push with API key created by system admin account

Steps to reproduce the bug

No response

Expected behavior

No response

Relevant log output

Additional information

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions