Function authorize

Source
pub async fn authorize(
    ctx: &AppCtx,
    ref_id: Uuid,
    level: PermissionLevel,
) -> Result<(), AppError>
Expand description

Verify that user is authorized to access a ref at a given permission level.

It is safe to proceed if the result is Ok; otherwise, the requested action should be aborted.