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

Function isWorkspaceRBACObjectEmpty

coderd/database/dbauthz/workspace_rbac_context.go:12–15  ·  view source on GitHub ↗
(rbacObj rbac.Object)

Source from the content-addressed store, hash-verified

10)
11
12func isWorkspaceRBACObjectEmpty(rbacObj rbac.Object) bool {
13 // if any of these are true then the rbac.Object work a workspace is considered empty
14 return rbacObj.Owner == "" || rbacObj.OrgID == "" || rbacObj.Owner == uuid.Nil.String() || rbacObj.OrgID == uuid.Nil.String()
15}
16
17type workspaceRBACContextKey struct{}
18

Callers 1

WithWorkspaceRBACFunction · 0.85

Calls 1

StringMethod · 0.45

Tested by

no test coverage detected