mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: audit addition and removal of licenses (#6125)
* added license audit resource * audit delete licenses * added filtering * remove logs * making the best of the current UUID situation * fixed lint * fix tests * regen docs * PR feedback * PR feedback
This commit is contained in:
Generated
+2
-1
@@ -93,7 +93,8 @@ CREATE TYPE resource_type AS ENUM (
|
||||
'git_ssh_key',
|
||||
'api_key',
|
||||
'group',
|
||||
'workspace_build'
|
||||
'workspace_build',
|
||||
'license'
|
||||
);
|
||||
|
||||
CREATE TYPE user_status AS ENUM (
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
-- It's not possible to drop enum values from enum types, so the UP has "IF NOT
|
||||
-- EXISTS".
|
||||
@@ -0,0 +1,3 @@
|
||||
ALTER TYPE resource_type
|
||||
ADD VALUE IF NOT EXISTS 'license';
|
||||
|
||||
@@ -883,6 +883,7 @@ const (
|
||||
ResourceTypeApiKey ResourceType = "api_key"
|
||||
ResourceTypeGroup ResourceType = "group"
|
||||
ResourceTypeWorkspaceBuild ResourceType = "workspace_build"
|
||||
ResourceTypeLicense ResourceType = "license"
|
||||
)
|
||||
|
||||
func (e *ResourceType) Scan(src interface{}) error {
|
||||
@@ -930,7 +931,8 @@ func (e ResourceType) Valid() bool {
|
||||
ResourceTypeGitSshKey,
|
||||
ResourceTypeApiKey,
|
||||
ResourceTypeGroup,
|
||||
ResourceTypeWorkspaceBuild:
|
||||
ResourceTypeWorkspaceBuild,
|
||||
ResourceTypeLicense:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -947,6 +949,7 @@ func AllResourceTypeValues() []ResourceType {
|
||||
ResourceTypeApiKey,
|
||||
ResourceTypeGroup,
|
||||
ResourceTypeWorkspaceBuild,
|
||||
ResourceTypeLicense,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user