Coverage Report

Created: 2026-03-25 23:22

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/home/runner/work/tenet/tenet/tenet-api/src/routes/policy.rs
Line
Count
Source
1
use tenet_aws::{
2
    ApiError,
3
    models::{organisation::OrganisationId, profile::UserId, project::ProjectId},
4
};
5
6
use crate::http::AppState;
7
8
0
pub async fn require_org_admin(
9
0
    state: &AppState,
10
0
    org_id: &OrganisationId,
11
0
    user_id: &UserId,
12
0
) -> Result<(), ApiError> {
13
0
    state.authz.verify_admin_access(org_id, user_id).await
14
0
}
15
16
0
pub async fn require_project_access(
17
0
    state: &AppState,
18
0
    org_id: &OrganisationId,
19
0
    project_id: &ProjectId,
20
0
    user_id: &UserId,
21
0
) -> Result<(), ApiError> {
22
0
    state
23
0
        .authz
24
0
        .verify_project_access(org_id, project_id, user_id)
25
0
        .await
26
0
}