1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 16:41:59 +00:00
immich/server/test/fixtures/system-config.stub.ts
Sam Holton 5417e34fb6
feat(server): Add publicUsers toggle for user search (#14330)
* feat(server): Add publicUsers toggle for user search

* tests

* docs: add check:typescript for web PR checklist

* return auth.user when publicUsers is false - app testing

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2024-11-26 15:51:01 +00:00

125 lines
2.2 KiB
TypeScript

import { SystemConfig } from 'src/config';
import { DeepPartial } from 'typeorm';
export const systemConfigStub = {
enabled: {
oauth: {
enabled: true,
autoRegister: true,
autoLaunch: false,
buttonText: 'OAuth',
},
},
disabled: {
passwordLogin: {
enabled: false,
},
},
oauthEnabled: {
oauth: {
enabled: true,
autoRegister: false,
autoLaunch: false,
buttonText: 'OAuth',
},
},
oauthWithAutoRegister: {
oauth: {
enabled: true,
autoRegister: true,
autoLaunch: false,
buttonText: 'OAuth',
},
},
oauthWithMobileOverride: {
oauth: {
enabled: true,
autoRegister: true,
mobileOverrideEnabled: true,
mobileRedirectUri: 'http://mobile-redirect',
buttonText: 'OAuth',
},
},
oauthWithStorageQuota: {
oauth: {
enabled: true,
autoRegister: true,
defaultStorageQuota: 1,
},
},
deleteDelay30: {
user: {
deleteDelay: 30,
},
},
libraryWatchEnabled: {
library: {
scan: {
enabled: false,
},
watch: {
enabled: true,
},
},
},
libraryWatchDisabled: {
library: {
scan: {
enabled: false,
},
watch: {
enabled: false,
},
},
},
libraryScan: {
library: {
scan: {
enabled: true,
cronExpression: '0 0 * * *',
},
watch: {
enabled: false,
},
},
},
libraryScanAndWatch: {
library: {
scan: {
enabled: true,
cronExpression: '0 0 * * *',
},
watch: {
enabled: true,
},
},
},
backupEnabled: {
backup: {
database: {
enabled: true,
cronExpression: '0 0 * * *',
keepLastAmount: 1,
},
},
},
machineLearningDisabled: {
machineLearning: {
enabled: false,
},
},
machineLearningEnabled: {
machineLearning: {
enabled: true,
clip: {
modelName: 'ViT-B-16__openai',
enabled: true,
},
},
},
publicUsersDisabled: {
server: {
publicUsers: false,
},
},
} satisfies Record<string, DeepPartial<SystemConfig>>;