MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / buildOwnershipCondition

Function buildOwnershipCondition

packages/cloud-agent-profile/src/profile-utils.ts:10–14  ·  view source on GitHub ↗
(owner: ProfileOwner)

Source from the content-addressed store, hash-verified

8 * Build ownership condition for profile queries.
9 */
10export function buildOwnershipCondition(owner: ProfileOwner) {
11 return owner.type === 'user'
12 ? eq(agent_environment_profiles.owned_by_user_id, owner.id)
13 : eq(agent_environment_profiles.owned_by_organization_id, owner.id);
14}
15
16/**
17 * Verify that a profile exists and is owned by the specified owner.

Callers 7

listProfilesFunction · 0.90
setDefaultProfileFunction · 0.90
getDefaultProfileFunction · 0.90
getProfileByNameFunction · 0.90
getProfileIdByNameFunction · 0.90
verifyProfileOwnershipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected