Skip to main content

PublicPublicationAuthorizer

Trait PublicPublicationAuthorizer 

Source
pub trait PublicPublicationAuthorizer: Send + Sync {
    // Required method
    fn authorize(
        &self,
        principal: &str,
        account: &str,
        collection: &str,
    ) -> Result<()>;

    // Provided method
    fn authorize_key_promotion(
        &self,
        _principal: &str,
        _account: &str,
    ) -> Result<()> { ... }
}
Expand description

Native policy gate required by PublicRepoWriter.

Required Methods§

Source

fn authorize( &self, principal: &str, account: &str, collection: &str, ) -> Result<()>

Authorize one direct publication before any public repository state is read or written. Implementations should apply native identity, assurance, account, collection, tenant, expiry and revocation policy.

Provided Methods§

Source

fn authorize_key_promotion( &self, _principal: &str, _account: &str, ) -> Result<()>

Separate account-owner authority: permission to publish a record never implicitly permits key replacement. Existing authorizers fail closed.

Implementors§