- Notifications
You must be signed in to change notification settings - Fork1k
feat: add a paginated organization members endpoint#16835
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
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
cea4d3c
e97c9db
34003dc
9edb088
ef40967
6aaddaf
a724f48
4925592
902538c
06ff95c
560305d
76a4cbf
737ac9f
8910df3
0e579a2
73e356c
24332f4
7af0b60
cdc0322
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -3581,6 +3581,14 @@ func (q *querier) OrganizationMembers(ctx context.Context, arg database.Organiza | ||||||||||||||||
return fetchWithPostFilter(q.auth, policy.ActionRead, q.db.OrganizationMembers)(ctx, arg) | ||||||||||||||||
} | ||||||||||||||||
func (q *querier) PaginatedOrganizationMembers(ctx context.Context, arg database.PaginatedOrganizationMembersParams) ([]database.PaginatedOrganizationMembersRow, error) { | ||||||||||||||||
// Required to have permission to read all members in the organization | ||||||||||||||||
if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceOrganizationMember.InOrg(arg.OrganizationID)); err != nil { | ||||||||||||||||
return nil, err | ||||||||||||||||
} | ||||||||||||||||
Comment on lines +3586 to +3588 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Just throw a comment Suggested change
| ||||||||||||||||
return q.db.PaginatedOrganizationMembers(ctx, arg) | ||||||||||||||||
} | ||||||||||||||||
func (q *querier) ReduceWorkspaceAgentShareLevelToAuthenticatedByTemplate(ctx context.Context, templateID uuid.UUID) error { | ||||||||||||||||
template, err := q.db.GetTemplateByID(ctx, templateID) | ||||||||||||||||
if err != nil { | ||||||||||||||||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -503,7 +503,7 @@ func asserts(inputs ...any) []AssertRBAC { | ||
// Could be the string type. | ||
actionAsString, ok := inputs[i+1].(string) | ||
if !ok { | ||
panic(fmt.Sprintf("action '%T' not a supported action",inputs[i+1])) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. nice catch 😂 | ||
} | ||
action = policy.Action(actionAsString) | ||
} | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.