pub trait KeyPermissionManager: Send {
    fn is_permitted(
        &self,
        public_key: &[u8],
        role: &str
    ) -> Result<bool, KeyPermissionError>; }
Expand description

Manages role-based permissions associated with public keys.

The KeyPermissionManager provides an interface for providing details on whether or not a public key has permissions to act in specific roles.

Note: the underlying implementation determines how those values are set and modified - these operations are not exposed via this interface.

Required Methods

Checks to see if a public key is permitted for the given role.

Errors

Returns a KeyPermissionError if the underling implementation encountered an error while checking the permissions.

Implementors