fix
This commit is contained in:
@@ -14,7 +14,7 @@ use tracing::{error, info};
|
||||
use utoipa::{IntoParams, ToSchema};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::auth::{ensure_active_tenant, jwt::DownloadSubject, TenantScopedConn};
|
||||
use crate::auth::{ensure_active_tenant_with_conn, jwt::DownloadSubject, TenantScopedConn};
|
||||
use crate::documents::asset::{
|
||||
asset_object_disposition, DocumentAssetDetailResponse, DocumentAssetResponse,
|
||||
DocumentVersionDetailResponse, DocumentVersionResponse,
|
||||
@@ -575,9 +575,8 @@ pub async fn download_with_token(
|
||||
.verify_download_token(&token)
|
||||
.map_err(|_| AppError::unauthorized())?;
|
||||
|
||||
ensure_active_tenant(&state, claims.tenant_id)?;
|
||||
|
||||
let mut conn = state.db_for_tenant(claims.tenant_id)?;
|
||||
ensure_active_tenant_with_conn(&mut conn, claims.tenant_id)?;
|
||||
|
||||
let now = Utc::now().naive_utc();
|
||||
let has_active_refresh: bool = select(exists(
|
||||
|
||||
Reference in New Issue
Block a user