Remove locked assets from shares
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user