mirror of
https://github.com/gtsteffaniak/filebrowser.git
synced 2026-11-27 00:49:41 -05:00
+11



![coderabbitai[bot]](/avatar/4a08c485fbe908b864e4cf902fddaff20a4dd8a58faf8f65f051648bd2ef3153?size=40)




45a14bf2f2
Signed-off-by: MichaIng <micha@dietpi.com> Co-authored-by: Kevin B. <kurami32_kbm@proton.me> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Mattijs Bliek <mattijs@mattijsbliek.com> Co-authored-by: GammelSami <39372285+GammelSami@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: yzxcj797 <54314860+yzxcj797@users.noreply.github.com> Co-authored-by: yzxcj797 <yzxcj797@users.noreply.github.com> Co-authored-by: DireMunchkin <dire.munchkin@proton.me> Co-authored-by: Chris <39135018+Chri6s@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Aditya Raj Singh <github@adityaraj.com> Co-authored-by: tbsagdic <86909795+tbsagdic@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> Co-authored-by: Ethan Lee Qi Yang <pluscompanyhqDEPT@gmail.com> Co-authored-by: Aditya Raj Singh <aditya@bncw.in> Co-authored-by: MichaIng <micha@dietpi.com> Co-authored-by: FandacqkaCorp <david@davidyloreto.com> Co-authored-by: FandacqkaCorp <275647464+FandacqkaCorp@users.noreply.github.com> Co-authored-by: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: connorjfarrell <connorjfarrell@users.noreply.github.com>
80 lines
5.0 KiB
Go
80 lines
5.0 KiB
Go
package settings
|
|
|
|
import (
|
|
"github.com/gtsteffaniak/filebrowser/backend/internal/database/users"
|
|
)
|
|
|
|
// ShareDefaults holds admin-configured default share options.
|
|
type ShareDefaults struct {
|
|
ShareTheme string `json:"shareTheme,omitempty"`
|
|
DisableAnonymous bool `json:"disableAnonymous,omitempty"`
|
|
DisableThumbnails bool `json:"disableThumbnails,omitempty"`
|
|
KeepAfterExpiration bool `json:"keepAfterExpiration,omitempty"`
|
|
ThemeColor string `json:"themeColor,omitempty"`
|
|
Title string `json:"title,omitempty"`
|
|
Description string `json:"description,omitempty"`
|
|
Favicon string `json:"favicon,omitempty"`
|
|
QuickDownload bool `json:"quickDownload,omitempty"`
|
|
HideNavButtons bool `json:"hideNavButtons,omitempty"`
|
|
DisableSidebar bool `json:"disableSidebar,omitempty"`
|
|
DisableShareCard bool `json:"disableShareCard,omitempty"`
|
|
EnforceDarkLightMode string `json:"enforceDarkLightMode,omitempty"`
|
|
ViewMode string `json:"viewMode,omitempty"`
|
|
EnableOnlyOffice bool `json:"enableOnlyOffice,omitempty"`
|
|
ShareType string `json:"shareType,omitempty"`
|
|
AllowDelete bool `json:"allowDelete,omitempty"`
|
|
AllowCreate bool `json:"allowCreate,omitempty"`
|
|
AllowModify bool `json:"allowModify,omitempty"`
|
|
DisableFileViewer bool `json:"disableFileViewer,omitempty"`
|
|
DisableDownload bool `json:"disableDownload,omitempty"`
|
|
AllowReplacements bool `json:"allowReplacements,omitempty"`
|
|
SidebarLinks []users.SidebarLink `json:"sidebarLinks,omitempty"`
|
|
ShowHidden bool `json:"showHidden,omitempty"`
|
|
DisableLoginOption bool `json:"disableLoginOption,omitempty"`
|
|
MaxBandwidth int `json:"maxBandwidth,omitempty"`
|
|
AllowedUsernames []string `json:"allowedUsernames,omitempty"`
|
|
PerUserDownloadLimit bool `json:"perUserDownloadLimit,omitempty"`
|
|
ExtractEmbeddedSubtitles bool `json:"extractEmbeddedSubtitles,omitempty"`
|
|
DownloadsLimit int `json:"downloadsLimit,omitempty"`
|
|
QuotaLimitBytes int64 `json:"quotaLimitBytes,omitempty"`
|
|
HideFileExt string `json:"hideFileExt,omitempty"`
|
|
Banner string `json:"banner,omitempty"`
|
|
}
|
|
|
|
// ShareDefaultsEnforcement marks which share default fields are enforced for non-admins.
|
|
type ShareDefaultsEnforcement struct {
|
|
ShareTheme bool `json:"shareTheme,omitempty"`
|
|
DisableAnonymous bool `json:"disableAnonymous,omitempty"`
|
|
DisableThumbnails bool `json:"disableThumbnails,omitempty"`
|
|
KeepAfterExpiration bool `json:"keepAfterExpiration,omitempty"`
|
|
ThemeColor bool `json:"themeColor,omitempty"`
|
|
Title bool `json:"title,omitempty"`
|
|
Description bool `json:"description,omitempty"`
|
|
Favicon bool `json:"favicon,omitempty"`
|
|
QuickDownload bool `json:"quickDownload,omitempty"`
|
|
HideNavButtons bool `json:"hideNavButtons,omitempty"`
|
|
DisableSidebar bool `json:"disableSidebar,omitempty"`
|
|
DisableShareCard bool `json:"disableShareCard,omitempty"`
|
|
EnforceDarkLightMode bool `json:"enforceDarkLightMode,omitempty"`
|
|
ViewMode bool `json:"viewMode,omitempty"`
|
|
EnableOnlyOffice bool `json:"enableOnlyOffice,omitempty"`
|
|
ShareType bool `json:"shareType,omitempty"`
|
|
AllowDelete bool `json:"allowDelete,omitempty"`
|
|
AllowCreate bool `json:"allowCreate,omitempty"`
|
|
AllowModify bool `json:"allowModify,omitempty"`
|
|
DisableFileViewer bool `json:"disableFileViewer,omitempty"`
|
|
DisableDownload bool `json:"disableDownload,omitempty"`
|
|
AllowReplacements bool `json:"allowReplacements,omitempty"`
|
|
SidebarLinks bool `json:"sidebarLinks,omitempty"`
|
|
ShowHidden bool `json:"showHidden,omitempty"`
|
|
DisableLoginOption bool `json:"disableLoginOption,omitempty"`
|
|
MaxBandwidth bool `json:"maxBandwidth,omitempty"`
|
|
AllowedUsernames bool `json:"allowedUsernames,omitempty"`
|
|
PerUserDownloadLimit bool `json:"perUserDownloadLimit,omitempty"`
|
|
ExtractEmbeddedSubtitles bool `json:"extractEmbeddedSubtitles,omitempty"`
|
|
DownloadsLimit bool `json:"downloadsLimit,omitempty"`
|
|
QuotaLimitBytes bool `json:"quotaLimitBytes,omitempty"`
|
|
HideFileExt bool `json:"hideFileExt,omitempty"`
|
|
Banner bool `json:"banner,omitempty"`
|
|
}
|