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

Method is_user_member

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

Check if a user is a member of this organization.

(self, user_id: str | UUID)

Source from the content-addressed store, hash-verified

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."""
288 # If we have the current user role set from summary queries, use that
289 if hasattr(self, '_current_user_role') and normalize_uuid(user_id) == normalize_uuid(
290 getattr(self, '_current_user_id', user_id)
291 ):
292 return True
293 return self.get_user_membership(user_id) is not None
294
295 def is_user_admin_or_owner(self, user_id: str | UUID) -> bool:
296 """Check if a user is an admin or owner of this organization."""

Callers 9

get_hosting_projectMethod · 0.80
get_orgFunction · 0.80
preview_member_add_costFunction · 0.80
get_stripe_pricingFunction · 0.80
__call__Method · 0.80
get_projectFunction · 0.80
get_trace_logsFunction · 0.80
get_projectMethod · 0.80
get_projectMethod · 0.80

Calls 2

get_user_membershipMethod · 0.95
normalize_uuidFunction · 0.70

Tested by

no test coverage detected