Skip to main content

authorize_maintenance

Function authorize_maintenance 

Source
pub fn authorize_maintenance(
    state: &AppState,
    headers: &HeaderMap,
    agent: Option<&AuthenticatedAgent>,
    name: &str,
) -> Result<(), ApiError>
Expand description

Allow a database maintenance operation (drop, backup) on name: the admin key, an admin token, or a token with the maintenance scope whose dbs names the database. Without any of these the admin key check’s answer stands (401 with no key, 403 with a wrong one).