feat: add auditing for groups (#4527)

- Clean up `database.TemplateACL` implementation.
This commit is contained in:
Jon Ayers
2022-10-19 02:00:45 -05:00
committed by GitHub
parent d4585fefb8
commit 0d1096da6c
27 changed files with 405 additions and 213 deletions
+15 -2
View File
@@ -68,10 +68,12 @@ INSERT INTO
max_ttl,
min_autostart_interval,
created_by,
icon
icon,
user_acl,
group_acl
)
VALUES
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12) RETURNING *;
($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14) RETURNING *;
-- name: UpdateTemplateActiveVersionByID :exec
UPDATE
@@ -106,6 +108,17 @@ WHERE
RETURNING
*;
-- name: UpdateTemplateACLByID :one
UPDATE
templates
SET
group_acl = $1,
user_acl = $2
WHERE
id = $3
RETURNING
*;
-- name: GetTemplateAverageBuildTime :one
WITH build_times AS (
SELECT