Returns the user associated with the given user id.
(&self, user_id: &UserId)
| 54 | |
| 55 | /// Returns the user associated with the given user id. |
| 56 | pub fn get_user(&self, user_id: &UserId) -> ServiceResult<User> { |
| 57 | let user = |
| 58 | self.user_repository |
| 59 | .get(&User::key(*user_id)) |
| 60 | .ok_or(UserError::NotFoundUser { |
| 61 | user: Uuid::from_bytes(user_id.to_owned()) |
| 62 | .hyphenated() |
| 63 | .to_string(), |
| 64 | })?; |
| 65 | |
| 66 | Ok(user) |
| 67 | } |
| 68 | |
| 69 | pub async fn get_caller_privileges_for_user( |
| 70 | &self, |