MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / get_user_membership

Method get_user_membership

app/api/agentops/opsboard/models.py:281–284  ·  view source on GitHub ↗

Get a user's membership in this organization.

(self, user_id: str | UUID)

Source from the content-addressed store, hash-verified

279
280 @require_loaded('users')
281 def get_user_membership(self, user_id: str | UUID) -> Optional['UserOrgModel']:
282 """Get a user's membership in this organization."""
283 user_id = normalize_uuid(user_id)
284 return next((user_org for user_org in self.users if user_org.user_id == user_id), None)
285
286 def is_user_member(self, user_id: str | UUID) -> bool:
287 """Check if a user is a member of this organization."""

Callers 9

set_current_userMethod · 0.95
is_user_memberMethod · 0.95
is_user_ownerMethod · 0.95
test_update_orgFunction · 0.95
test_invite_to_orgFunction · 0.95

Calls 1

normalize_uuidFunction · 0.70

Tested by 5

test_update_orgFunction · 0.76
test_invite_to_orgFunction · 0.76