Evaluate one signer against this policy. `repository_identity` is the repository's own signer DID (the stated default trust root) when one is configured. `revoked` always wins: revocation is explicit and cannot be re-trusted by listing.
(&self, signer: &str, repository_identity: Option<&str>)
| 857 | /// default trust root) when one is configured. `revoked` always wins: |
| 858 | /// revocation is explicit and cannot be re-trusted by listing. |
| 859 | pub fn evaluate(&self, signer: &str, repository_identity: Option<&str>) -> SignerTrust { |
| 860 | if self.revoked.iter().any(|did| did == signer) { |
| 861 | return SignerTrust::Revoked; |
| 862 | } |
| 863 | if repository_identity.is_some_and(|identity| identity == signer) |
| 864 | || self.signers.iter().any(|did| did == signer) |
| 865 | { |
| 866 | return SignerTrust::Trusted; |
| 867 | } |
| 868 | SignerTrust::Unknown |
| 869 | } |
| 870 | } |
| 871 | |
| 872 | #[cfg(test)] |