Skip to content

feat: store coder_workspace_tags in the database #13294

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 27 commits into from
May 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix
  • Loading branch information
mtojek committed May 17, 2024
commit 19815715a971c5859a436d956769c563bc38de3f
4 changes: 2 additions & 2 deletions coderd/database/dbauthz/dbauthz.go
Original file line number Diff line number Diff line change
Expand Up @@ -1803,7 +1803,7 @@ func (q *querier) GetTemplateVersionWorkspaceTags(ctx context.Context, templateV
object = tv.RBACObject(template)
}

if err := q.authorizeContext(ctx, rbac.ActionRead, object); err != nil {
if err := q.authorizeContext(ctx, policy.ActionRead, object); err != nil {
return nil, err
}
return q.db.GetTemplateVersionWorkspaceTags(ctx, templateVersionID)
Expand Down Expand Up @@ -2531,7 +2531,7 @@ func (q *querier) InsertTemplateVersionVariable(ctx context.Context, arg databas
}

func (q *querier) InsertTemplateVersionWorkspaceTag(ctx context.Context, arg database.InsertTemplateVersionWorkspaceTagParams) (database.TemplateVersionWorkspaceTag, error) {
if err := q.authorizeContext(ctx, rbac.ActionCreate, rbac.ResourceSystem); err != nil {
if err := q.authorizeContext(ctx, policy.ActionCreate, rbac.ResourceSystem); err != nil {
return database.TemplateVersionWorkspaceTag{}, err
}
return q.db.InsertTemplateVersionWorkspaceTag(ctx, arg)
Expand Down
Loading