From 28c9b70f75a8cc2dd34e19eb8efe07d0c4934876 Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Tue, 5 Nov 2024 22:47:30 +0000 Subject: [PATCH] chore: update missing RBAC action descriptions --- coderd/rbac/object_gen.go | 26 +++++++++++++------------- coderd/rbac/policy/policy.go | 26 +++++++++++++------------- site/src/api/rbacresourcesGenerated.ts | 26 +++++++++++++------------- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/coderd/rbac/object_gen.go b/coderd/rbac/object_gen.go index 61caf0945b245..12ac8a86a7dd9 100644 --- a/coderd/rbac/object_gen.go +++ b/coderd/rbac/object_gen.go @@ -157,29 +157,29 @@ var ( // ResourceOauth2App // Valid Actions - // - "ActionCreate" :: make an OAuth2 app. + // - "ActionCreate" :: make an OAuth2 app // - "ActionDelete" :: delete an OAuth2 app // - "ActionRead" :: read OAuth2 apps - // - "ActionUpdate" :: update the properties of the OAuth2 app. + // - "ActionUpdate" :: update the properties of the OAuth2 app ResourceOauth2App = Object{ Type: "oauth2_app", } // ResourceOauth2AppCodeToken // Valid Actions - // - "ActionCreate" :: - // - "ActionDelete" :: - // - "ActionRead" :: + // - "ActionCreate" :: create an OAuth2 app code token + // - "ActionDelete" :: delete an OAuth2 app code token + // - "ActionRead" :: read an OAuth2 app code token ResourceOauth2AppCodeToken = Object{ Type: "oauth2_app_code_token", } // ResourceOauth2AppSecret // Valid Actions - // - "ActionCreate" :: - // - "ActionDelete" :: - // - "ActionRead" :: - // - "ActionUpdate" :: + // - "ActionCreate" :: create an OAuth2 app secret + // - "ActionDelete" :: delete an OAuth2 app secret + // - "ActionRead" :: read an OAuth2 app secret + // - "ActionUpdate" :: update an OAuth2 app secret ResourceOauth2AppSecret = Object{ Type: "oauth2_app_secret", } @@ -242,10 +242,10 @@ var ( // ResourceTailnetCoordinator // Valid Actions - // - "ActionCreate" :: - // - "ActionDelete" :: - // - "ActionRead" :: - // - "ActionUpdate" :: + // - "ActionCreate" :: create a Tailnet coordinator + // - "ActionDelete" :: delete a Tailnet coordinator + // - "ActionRead" :: view info about a Tailnet coordinator + // - "ActionUpdate" :: update a Tailnet coordinator ResourceTailnetCoordinator = Object{ Type: "tailnet_coordinator", } diff --git a/coderd/rbac/policy/policy.go b/coderd/rbac/policy/policy.go index d70dd69821429..2691eed9fe0a9 100644 --- a/coderd/rbac/policy/policy.go +++ b/coderd/rbac/policy/policy.go @@ -215,10 +215,10 @@ var RBACPermissions = map[string]PermissionDefinition{ }, "tailnet_coordinator": { Actions: map[Action]ActionDefinition{ - ActionCreate: actDef(""), - ActionRead: actDef(""), - ActionUpdate: actDef(""), - ActionDelete: actDef(""), + ActionCreate: actDef("create a Tailnet coordinator"), + ActionRead: actDef("view info about a Tailnet coordinator"), + ActionUpdate: actDef("update a Tailnet coordinator"), + ActionDelete: actDef("delete a Tailnet coordinator"), }, }, "assign_role": { @@ -241,25 +241,25 @@ var RBACPermissions = map[string]PermissionDefinition{ }, "oauth2_app": { Actions: map[Action]ActionDefinition{ - ActionCreate: actDef("make an OAuth2 app."), + ActionCreate: actDef("make an OAuth2 app"), ActionRead: actDef("read OAuth2 apps"), - ActionUpdate: actDef("update the properties of the OAuth2 app."), + ActionUpdate: actDef("update the properties of the OAuth2 app"), ActionDelete: actDef("delete an OAuth2 app"), }, }, "oauth2_app_secret": { Actions: map[Action]ActionDefinition{ - ActionCreate: actDef(""), - ActionRead: actDef(""), - ActionUpdate: actDef(""), - ActionDelete: actDef(""), + ActionCreate: actDef("create an OAuth2 app secret"), + ActionRead: actDef("read an OAuth2 app secret"), + ActionUpdate: actDef("update an OAuth2 app secret"), + ActionDelete: actDef("delete an OAuth2 app secret"), }, }, "oauth2_app_code_token": { Actions: map[Action]ActionDefinition{ - ActionCreate: actDef(""), - ActionRead: actDef(""), - ActionDelete: actDef(""), + ActionCreate: actDef("create an OAuth2 app code token"), + ActionRead: actDef("read an OAuth2 app code token"), + ActionDelete: actDef("delete an OAuth2 app code token"), }, }, "notification_message": { diff --git a/site/src/api/rbacresourcesGenerated.ts b/site/src/api/rbacresourcesGenerated.ts index 79a80ef593d90..4ce48121edbb3 100644 --- a/site/src/api/rbacresourcesGenerated.ts +++ b/site/src/api/rbacresourcesGenerated.ts @@ -85,21 +85,21 @@ export const RBACResourceActions: Partial< update: "update notification templates", }, oauth2_app: { - create: "make an OAuth2 app.", + create: "make an OAuth2 app", delete: "delete an OAuth2 app", read: "read OAuth2 apps", - update: "update the properties of the OAuth2 app.", + update: "update the properties of the OAuth2 app", }, oauth2_app_code_token: { - create: "", - delete: "", - read: "", + create: "create an OAuth2 app code token", + delete: "delete an OAuth2 app code token", + read: "read an OAuth2 app code token", }, oauth2_app_secret: { - create: "", - delete: "", - read: "", - update: "", + create: "create an OAuth2 app secret", + delete: "delete an OAuth2 app secret", + read: "read an OAuth2 app secret", + update: "update an OAuth2 app secret", }, organization: { create: "create an organization", @@ -134,10 +134,10 @@ export const RBACResourceActions: Partial< update: "update system resources", }, tailnet_coordinator: { - create: "", - delete: "", - read: "", - update: "", + create: "create a Tailnet coordinator", + delete: "delete a Tailnet coordinator", + read: "view info about a Tailnet coordinator", + update: "update a Tailnet coordinator", }, template: { create: "create a template",