mirror of
https://git.srhtnin.garden/sarah/SaraView.git
synced 2026-10-15 02:43:17 +02:00
Added groups and restricted access.
This commit is contained in:
1 parent
8aa223bc7b
commit
9a5b9530a3
17 files changed
+1406
-66
No files matched your search
@@ -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"))
|
||||
|
||||
Reference in new issue
Block a user