Check the grant again — after time spent waiting for the repository, it may have expired or been revoked.
(&self, state: &DaemonState)
| 543 | /// Check the grant again — after time spent waiting for the repository, |
| 544 | /// it may have expired or been revoked. |
| 545 | pub fn revalidate(&self, state: &DaemonState) -> Result<(), Status> { |
| 546 | match &self.token { |
| 547 | Some(token) => state |
| 548 | .sandbox_grants() |
| 549 | .resolve(token) |
| 550 | .map(|_| ()) |
| 551 | .map_err(|e| e.status()), |
| 552 | None if self.grant.is_live_at(Utc::now()) => Ok(()), |
| 553 | None => Err(GrantError::Expired(self.grant.expires).status()), |
| 554 | } |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | /// The `ViewRef.view_id` the handlers issue for a view name. |
no test coverage detected