pub fn check_authorized_key(&self) -> Result<(), Error> {
        eprintln!("Authorizing...");

        if let Some(key) = &self.env.cert_key {
            if self.authorized_keys.is_empty() {
                // If we didn't explicitly say that certain keys only should be allowed, all
                // keys are allowed. This is how we allow project creation to pass verification.
                return Ok(());
            }
            eprintln!("Checking provided key {}...", key);

            if self.authorized_keys.contains(key) {
                eprintln!("Key {} is authorized to push.", key);
                return Ok(());
            }
        }

        Err(Error::Unauthorized("key is not in keyring"))
    }
/// Check if the cert_key is found in an authorized keyring
Check if the cert_key is found in an authorized keyring
Check if the cert_key is found in an authorized keyring
pub fn check_authorized_key(&self) -> Result<(), Error> {
        eprintln!("Authorizing...");
        if let Some(key) = &self.env.cert_key {
            if self.authorized_keys.is_empty() {
                // If we didn't explicitly say that certain keys only should be allowed, all
                // keys are allowed. This is how we allow project creation to pass verification.
                return Ok(());
            }
            eprintln!("Checking provided key {}...", key);
            if self.authorized_keys.contains(key) {
                eprintln!("Key {} is authorized to push.", key);
                return Ok(());
            }
        }
        Err(Error::Unauthorized("key is not in keyring"))
    }
pub fn check_authorized_key ( & self ) -> Result < ( ) , Error > { eprintln ! ( " " ) ; if let Some ( key ) = & self . env . cert_key { if self . authorized_keys . is_empty ( ) { // If we didn't explicitly say that certain keys only should be allowed, all // keys are allowed. This is how we allow project creation to pass verification. return Ok ( ( ) ) ; } eprintln ! ( " " key ) ; if self . authorized_keys . contains ( key ) { eprintln ! ( " " key ) ; return Ok ( ( ) ) ; } } Err ( Error :: Unauthorized ( " " ) ) }
Check if the cert_key is found in an authorized keyring
Check if the cert_key is found in an authorized keyring
&self
&self