mirror of
https://github.com/immich-app/immich.git
synced 2025-01-07 12:26:47 +01:00
7303fab9d9
* feat(server/web): add oauth defaultStorageQuota and storageQuotaClaim * feat(server/web): fix format and use domain.util constants * address some pr feedback * simplify oauth storage quota logic * adding tests and pr feedback * chore: cleanup --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
32 lines
1.5 KiB
TypeScript
32 lines
1.5 KiB
TypeScript
import { SystemConfigEntity, SystemConfigKey } from '@app/infra/entities';
|
|
|
|
export const systemConfigStub: Record<string, SystemConfigEntity[]> = {
|
|
defaults: [],
|
|
enabled: [
|
|
{ key: SystemConfigKey.OAUTH_ENABLED, value: true },
|
|
{ key: SystemConfigKey.OAUTH_AUTO_REGISTER, value: true },
|
|
{ key: SystemConfigKey.OAUTH_AUTO_LAUNCH, value: false },
|
|
{ key: SystemConfigKey.OAUTH_BUTTON_TEXT, value: 'OAuth' },
|
|
],
|
|
disabled: [{ key: SystemConfigKey.PASSWORD_LOGIN_ENABLED, value: false }],
|
|
noAutoRegister: [
|
|
{ key: SystemConfigKey.OAUTH_ENABLED, value: true },
|
|
{ key: SystemConfigKey.OAUTH_AUTO_LAUNCH, value: false },
|
|
{ key: SystemConfigKey.OAUTH_AUTO_REGISTER, value: false },
|
|
{ key: SystemConfigKey.OAUTH_BUTTON_TEXT, value: 'OAuth' },
|
|
],
|
|
override: [
|
|
{ key: SystemConfigKey.OAUTH_ENABLED, value: true },
|
|
{ key: SystemConfigKey.OAUTH_AUTO_REGISTER, value: true },
|
|
{ key: SystemConfigKey.OAUTH_MOBILE_OVERRIDE_ENABLED, value: true },
|
|
{ key: SystemConfigKey.OAUTH_MOBILE_REDIRECT_URI, value: 'http://mobile-redirect' },
|
|
{ key: SystemConfigKey.OAUTH_BUTTON_TEXT, value: 'OAuth' },
|
|
],
|
|
withDefaultStorageQuota: [
|
|
{ key: SystemConfigKey.OAUTH_ENABLED, value: true },
|
|
{ key: SystemConfigKey.OAUTH_AUTO_REGISTER, value: true },
|
|
{ key: SystemConfigKey.OAUTH_DEFAULT_STORAGE_QUOTA, value: 1 },
|
|
],
|
|
libraryWatchEnabled: [{ key: SystemConfigKey.LIBRARY_WATCH_ENABLED, value: true }],
|
|
libraryWatchDisabled: [{ key: SystemConfigKey.LIBRARY_WATCH_ENABLED, value: false }],
|
|
};
|