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

Method IsPrebuild

coderd/database/modelmethods.go:487–489  ·  view source on GitHub ↗

IsPrebuild returns true if the workspace is a prebuild workspace. A workspace is considered a prebuild if its owner is the prebuild system user.

()

Source from the content-addressed store, hash-verified

485// IsPrebuild returns true if the workspace is a prebuild workspace.
486// A workspace is considered a prebuild if its owner is the prebuild system user.
487func (w Workspace) IsPrebuild() bool {
488 return w.OwnerID == PrebuildsSystemUserID
489}
490
491// AsPrebuild returns the RBAC object corresponding to the workspace type.
492// If the workspace is a prebuild, it returns a prebuilt_workspace RBAC object.

Callers 3

AsPrebuildMethod · 0.95
FailJobMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected