mirror of
https://github.com/coder/coder.git
synced 2025-07-18 14:17:22 +00:00
feat: add "updated" search param to workspaces (#11714)
* feat: add "updated" search param to workspaces * rego -> sql needs to specify which <table>.organization_id
This commit is contained in:
@ -198,7 +198,7 @@ type workspaceQuerier interface {
|
||||
// This code is copied from `GetWorkspaces` and adds the authorized filter WHERE
|
||||
// clause.
|
||||
func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspacesParams, prepared rbac.PreparedAuthorized) ([]GetWorkspacesRow, error) {
|
||||
authorizedFilter, err := prepared.CompileToSQL(ctx, rbac.ConfigWithoutACL())
|
||||
authorizedFilter, err := prepared.CompileToSQL(ctx, rbac.ConfigWorkspaces())
|
||||
if err != nil {
|
||||
return nil, xerrors.Errorf("compile authorized filter: %w", err)
|
||||
}
|
||||
@ -225,6 +225,7 @@ func (q *sqlQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg GetWorkspa
|
||||
arg.Dormant,
|
||||
arg.LastUsedBefore,
|
||||
arg.LastUsedAfter,
|
||||
arg.UsingActive,
|
||||
arg.Offset,
|
||||
arg.Limit,
|
||||
)
|
||||
|
Reference in New Issue
Block a user