MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / get_role_meta_for_user

Function get_role_meta_for_user

agents/master-coordinator/main.py:224–232  ·  view source on GitHub ↗

Find the role metadata entry that belongs to a given user.

(user_id: str)

Source from the content-addressed store, hash-verified

222
223
224def get_role_meta_for_user(user_id: str) -> Optional[Dict[str, Any]]:
225 """Find the role metadata entry that belongs to a given user."""
226 roles_meta = load_roles_meta()
227 for role_name, role_info in roles_meta.get("roles", {}).items():
228 if role_info.get("user_id") == user_id:
229 role_copy = dict(role_info)
230 role_copy["role_name"] = role_name
231 return role_copy
232 return None
233
234
235def resolve_role_chat_id(user_id: str, profile: Optional[Dict[str, Any]] = None) -> Optional[str]:

Callers 3

resolve_role_chat_idFunction · 0.85
__init__Method · 0.85

Calls 2

getMethod · 0.80
load_roles_metaFunction · 0.70

Tested by

no test coverage detected