Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: add template_with_user view to include user contextual data #8568

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 17 commits into from
Jul 19, 2023
Merged
Show file tree
Hide file tree
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
Cleanup
  • Loading branch information
Emyrk committed Jul 18, 2023
commit cffbb614072e62f33d9dd36fdea60e03e1ce1648
1 change: 1 addition & 0 deletions coderd/database/migrations/000138_join_users.down.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
BEGIN;

DROP VIEW visible_users;
DROP VIEW template_with_users;

COMMIT;
9 changes: 3 additions & 6 deletions coderd/database/queries/templates.sql
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ SET
allow_user_cancel_workspace_jobs = $7
WHERE
id = $1
RETURNING
*;
;

-- name: UpdateTemplateScheduleByID :exec
UPDATE
Expand All @@ -124,8 +123,7 @@ SET
locked_ttl = $9
WHERE
id = $1
RETURNING
*;
;

-- name: UpdateTemplateACLByID :exec
UPDATE
Expand All @@ -135,8 +133,7 @@ SET
user_acl = $2
WHERE
id = $3
RETURNING
*;
;

-- name: GetTemplateAverageBuildTime :one
WITH build_times AS (
Expand Down
2 changes: 0 additions & 2 deletions coderd/database/sqlc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,3 @@ sql:
emit_db_tags: true
emit_enum_valid_method: true
emit_all_enum_values: true
rename:
template_with_users: TemplateTest
2 changes: 1 addition & 1 deletion enterprise/audit/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ var auditableResourcesTypes = map[any]map[string]Action{
"default_ttl": ActionTrack,
"created_by": ActionTrack,
"created_by_username": ActionTrack,
"created_by_avatar_url": ActionIgnore,
"created_by_avatar_url": ActionTrack,
"group_acl": ActionTrack,
"user_acl": ActionTrack,
"allow_user_autostart": ActionTrack,
Expand Down