MCPcopy Index your code
hub / github.com/coder/coder / sdkPermissionToDB

Function sdkPermissionToDB

enterprise/coderd/roles.go:284–290  ·  view source on GitHub ↗
(p codersdk.Permission)

Source from the content-addressed store, hash-verified

282}
283
284func sdkPermissionToDB(p codersdk.Permission) database.CustomRolePermission {
285 return database.CustomRolePermission{
286 Negate: p.Negate,
287 ResourceType: string(p.ResourceType),
288 Action: policy.Action(p.Action),
289 }
290}
291
292func validOrganizationRoleRequest(ctx context.Context, req codersdk.CustomRoleRequest, rw http.ResponseWriter) bool {
293 // This check is not ideal, but we cannot enforce a unique role name in the db against

Callers

nothing calls this directly

Calls 1

ActionTypeAlias · 0.92

Tested by

no test coverage detected