Remove locked assets from shares

This commit is contained in:
Alan Grainger
2026-10-07 18:08:12 +13:00
parent 172f247418
commit 285d48e9d0
8 changed files with 69 additions and 19 deletions
+11
View File
@@ -3,6 +3,16 @@ export enum AssetType {
video = 'VIDEO'
}
/** Immich's asset visibility states, as the API serialises them. */
export enum AssetVisibility {
timeline = 'timeline',
archive = 'archive',
/** The video half of a motion photo, never shown on its own */
hidden = 'hidden',
/** The owner's PIN-protected locked folder */
locked = 'locked'
}
export enum KeyType {
key = 'key',
slug = 'slug'
@@ -49,6 +59,7 @@ export interface Asset {
localDateTime?: string;
type: AssetType;
isTrashed: boolean;
visibility?: AssetVisibility;
exifInfo?: ExifInfo;
width?: number;
height?: number;
+1 -5
View File
@@ -4,11 +4,7 @@ import type { Server } from 'http'
import type { AddressInfo } from 'net'
import { sessionMiddleware, unlockHandler } from '../src/session'
/*
The unlock body is visitor input. Only a share-shaped key with a string
password is stored; anything else is dropped before it reaches the cookie,
so a stray object can never become `req.password` or a session key.
*/
// The unlock body is visitor input: only a share-shaped key and a string password may reach the cookie
describe('unlockHandler', () => {
let server: Server