Files
filebrowser/backend/pkg/settings/enforcement_structs.go
T
+10 3c02eedca6 Beta/v2.0.0 (#2746)
Co-authored-by: Kevin B. <kurami32_kbm@proton.me>
Co-authored-by: Gabriel Górski <me@glaeqen.eu>
Co-authored-by: Joel Godfrey <82655889+BaccanoMob@users.noreply.github.com>
Co-authored-by: Shane Chiu <71911511+pwn2ooown@users.noreply.github.com>
Co-authored-by: carloda <35763669+carloda@users.noreply.github.com>
Co-authored-by: Taufik Hidayat <taufikdev88@gmail.com>
Co-authored-by: Stephan Paternotte <Stephan-P@users.noreply.github.com>
Co-authored-by: SIDDHU SINGH <siddhu3116@gmail.com>
Co-authored-by: Gaurav Kalal <117557391+Gorupa@users.noreply.github.com>
Co-authored-by: Nebula <40148908+nebula-it@users.noreply.github.com>
Co-authored-by: Juan Soler <juansoler@gmail.com>
Co-authored-by: codacy-production[bot] <61871480+codacy-production[bot]@users.noreply.github.com>
Co-authored-by: Anatolii Prylutskyi <anpryl@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Graham Steffaniak <graham@debian-lake.ghome.net>
Co-authored-by: Neil <kylelzzz02@icloud.com>
Co-authored-by: Graham <info@quantumx-apps.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-07 16:24:38 -05:00

89 lines
4.0 KiB
Go

package settings
// UserDefaultsEnforcement marks which default fields are enforced for all users (policy mask).
type UserDefaultsEnforcement struct {
Sidebar UserDefaultsSidebarEnforcement `json:"sidebar,omitempty"`
Listing UserDefaultsListingEnforcement `json:"listing,omitempty"`
Preview UserDefaultsPreviewEnforcement `json:"preview,omitempty"`
FileViewer UserDefaultsFileViewerEnforcement `json:"fileViewer,omitempty"`
Search UserDefaultsSearchEnforcement `json:"search,omitempty"`
UI UserDefaultsUIEnforcement `json:"ui,omitempty"`
FileLoading UserDefaultsFileLoadingEnforcement `json:"fileLoading,omitempty"`
Account UserDefaultsAccountEnforcement `json:"account,omitempty"`
}
type UserDefaultsSidebarEnforcement struct {
DisableQuickToggles bool `json:"disableQuickToggles,omitempty"`
HideFileActions bool `json:"hideFileActions,omitempty"`
DisableHideOnPreview bool `json:"disableHideOnPreview,omitempty"`
Sticky bool `json:"sticky,omitempty"`
HideFiles bool `json:"hideFiles,omitempty"`
ShowTools bool `json:"showTools,omitempty"`
}
type UserDefaultsListingEnforcement struct {
DeleteWithoutConfirming bool `json:"deleteWithoutConfirming,omitempty"`
DateFormat bool `json:"dateFormat,omitempty"`
ShowHidden bool `json:"showHidden,omitempty"`
QuickDownload bool `json:"quickDownload,omitempty"`
ShowSelectMultiple bool `json:"showSelectMultiple,omitempty"`
SingleClick bool `json:"singleClick,omitempty"`
HideFileExt bool `json:"hideFileExt,omitempty"`
ShowCopyPath bool `json:"showCopyPath,omitempty"`
DeleteAfterArchive bool `json:"deleteAfterArchive,omitempty"`
ViewMode bool `json:"viewMode,omitempty"`
GallerySize bool `json:"gallerySize,omitempty"`
}
type UserDefaultsPreviewEnforcement struct {
Image bool `json:"image,omitempty"`
Video bool `json:"video,omitempty"`
Audio bool `json:"audio,omitempty"`
MotionVideoPreview bool `json:"motionVideoPreview,omitempty"`
Office bool `json:"office,omitempty"`
PopUp bool `json:"popup,omitempty"`
DisablePreviewExt bool `json:"disablePreviewExt,omitempty"`
Folder bool `json:"folder,omitempty"`
Models bool `json:"models,omitempty"`
}
type UserDefaultsFileViewerEnforcement struct {
EditorQuickSave bool `json:"editorQuickSave,omitempty"`
AutoplayMedia bool `json:"autoplayMedia,omitempty"`
DisableViewingExt bool `json:"disableViewingExt,omitempty"`
DisableOnlyOfficeExt bool `json:"disableOnlyOfficeExt,omitempty"`
PreferEditorForMarkdown bool `json:"preferEditorForMarkdown,omitempty"`
DebugOffice bool `json:"debugOffice,omitempty"`
}
type UserDefaultsSearchEnforcement struct {
DisableOptions bool `json:"disableOptions,omitempty"`
}
type UserDefaultsUIEnforcement struct {
DarkMode bool `json:"darkMode,omitempty"`
ThemeColor bool `json:"themeColor,omitempty"`
CustomTheme bool `json:"customTheme,omitempty"`
Locale bool `json:"locale,omitempty"`
}
type UserDefaultsFileLoadingEnforcement struct {
MaxConcurrent bool `json:"maxConcurrentUpload,omitempty"`
UploadChunkSize bool `json:"uploadChunkSizeMb,omitempty"`
DownloadChunkSize bool `json:"downloadChunkSizeMb,omitempty"`
}
type UserDefaultsAccountEnforcement struct {
LockPassword bool `json:"lockPassword,omitempty"`
DisableSettings bool `json:"disableSettings,omitempty"`
DisableUpdateNotifications bool `json:"disableUpdateNotifications,omitempty"`
Permissions UserDefaultsAccountPermissionsEnforcement `json:"permissions,omitempty"`
}
type UserDefaultsAccountPermissionsEnforcement struct {
Admin bool `json:"admin,omitempty"`
Api bool `json:"api,omitempty"`
Share bool `json:"share,omitempty"`
Realtime bool `json:"realtime,omitempty"`
}