pub async fn authorize_with_fetched_list_of_roles(
conn: &mut PgConnection,
action: Action,
resource: Resource,
user_roles: &[Role],
) -> AuthorizationResult<AuthorizationToken>Expand description
Same as authorize, but takes already-fetched roles instead of querying for them; use when checking several actions for the same user.