Added groups and restricted access.

This commit is contained in:
sarah committed 2026-09-21 06:52:31 +02:00
1 parent 8aa223bc7b
commit 9a5b9530a3
17 files changed
+1406 -66

No files matched your search

+9
View File
@@ -42,6 +42,8 @@ DefaultSettings: dict[str, Any] = {
"NewEntryButtonsAtTop": False,
"StickyToolbar": True,
"ConfirmBeforeDelete": True,
"VisibleInBlame": True,
"ShowBlameAvatars": False,
}
DefaultThemesDirectory = ApplicationDirectory / "DefaultThemes"
@@ -135,6 +137,13 @@ def SaveSettings(Username: str, NewSettings: dict[str, Any]) -> dict[str, Any]:
return Merged
def RenameUserSettings(OldUsername: str, NewUsername: str) -> None:
OldPath = GetSettingsPath(OldUsername)
if OldPath.is_file():
OldPath.rename(GetSettingsPath(NewUsername))
def ListThemeNames() -> list[str]:
EnsureDataDirectory()
return sorted(ThemeFile.stem for ThemeFile in GetThemesDirectory().glob("*.toml"))