MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / commitmentOwnerRemoves

Function commitmentOwnerRemoves

internal/server/commitment_access.go:39–41  ·  view source on GitHub ↗

commitmentOwnerRemoves is the one predicate for reaching past collection restrictions and onto deleted ends. It applies only to removal, and an app principal never takes it past its install ceiling. The hidden-partner refusal uses it too, so only a caller who can remove is told they can.

(owner bool, user *models.User)

Source from the content-addressed store, hash-verified

37// principal never takes it past its install ceiling. The hidden-partner
38// refusal uses it too, so only a caller who can remove is told they can.
39func commitmentOwnerRemoves(owner bool, user *models.User) bool {
40 return owner && !user.IsApp()
41}
42
43// buildCommitmentAccess runs only for an already admitted workspace. All reads
44// use q, including when a mutation reloads permissions inside its transaction.

Callers 2

buildCommitmentAccessMethod · 0.85

Calls 1

IsAppMethod · 0.80

Tested by

no test coverage detected