Skip to content

Commit

Permalink
ISPyB LIMS: add method for fetching user full name
Browse files Browse the repository at this point in the history
Adds a method to ISPyB data adapter for fetching information
about a user.

This is usefull when looking up user's full name.
  • Loading branch information
elmjag committed Jan 28, 2025
1 parent 4b3ad47 commit dc3613a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mxcubecore/HardwareObjects/abstract/ISPyBDataAdapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ def get_sessions_by_code_and_number(
self._error(str(e))
raise e

def get_person_by_username(self, username: str) -> Dict:
try:
person = self._shipping.service.findPersonByLogin(username)
return asdict(person)
except WebFault as e:
self._error(str(e))

return {}

def get_sessions_by_username(
self, username: str, beamline_name: str
) -> LimsSessionManager:
Expand Down

0 comments on commit dc3613a

Please sign in to comment.