headless_lms_server::controllers::auth

Function authorize_multiple_actions_on_resources

Source
pub async fn authorize_multiple_actions_on_resources(
    pool: Data<PgPool>,
    user: Option<AuthUser>,
    payload: Json<Vec<ActionOnResource>>,
) -> ControllerResult<Json<Vec<bool>>>
Expand description

POST /api/v0/auth/authorize-multiple checks whether user can perform specified action on specified resource. Returns booleans for the authorizations in the same order as the input.