Skip to main content

check_scope

Function check_scope 

Source
pub fn check_scope(
    auth_ctx: Option<&AuthContext>,
    project_id: &str,
    benchmark: Option<&str>,
    scope: Scope,
) -> Result<(), (StatusCode, Json<ApiError>)>
Expand description

Checks if the current auth context has the required scope, project access, and benchmark access. Returns an error response if the scope is not present, project mismatch, or benchmark restricted.