2025-08-14 16:59:07 +02:00
|
|
|
import {Brackets} from 'typeorm';
|
|
|
|
|
import {UserDTO} from '../../common/entities/UserDTO';
|
2025-08-17 11:43:29 +02:00
|
|
|
import {SearchQueryDTO} from '../../common/entities/SearchQueryDTO';
|
2025-08-14 16:59:07 +02:00
|
|
|
|
|
|
|
|
export class SessionContext {
|
2025-08-17 11:43:29 +02:00
|
|
|
user: ContextUser;
|
2025-08-15 11:01:21 +02:00
|
|
|
// New structured projection with prebuilt SQL and params
|
2025-08-15 11:06:16 +02:00
|
|
|
projectionQuery?: Brackets;
|
2025-09-07 16:04:03 +02:00
|
|
|
projectionQueryForSubDir?: Brackets; // only the directory part of the query, where it filters 'directories' instead of 'directory' aliases
|
2025-09-07 15:02:01 +02:00
|
|
|
hasDirectoryProjection: boolean;
|
2025-08-14 16:59:07 +02:00
|
|
|
}
|
2025-08-17 11:43:29 +02:00
|
|
|
|
|
|
|
|
export interface ContextUser extends UserDTO {
|
|
|
|
|
overrideAllowBlockList?: boolean;
|
|
|
|
|
|
|
|
|
|
allowQuery?: SearchQueryDTO;
|
|
|
|
|
|
|
|
|
|
blockQuery?: SearchQueryDTO;
|
|
|
|
|
}
|