changes in db

This commit is contained in:
Mateusz Gruszczyński
2026-05-26 09:38:12 +02:00
parent 70a9344cdd
commit 514482f0b5
15 changed files with 30 additions and 19 deletions

View File

@@ -344,8 +344,9 @@ def save_auto_backup_settings(data: dict, user_id: int | None = None, backup_typ
if backup_type == "app":
_require_admin(user_id)
else:
if not profile_id or not auth.can_access_profile(int(profile_id), user_id):
raise PermissionError("No access to profile")
# Note: Profile backup schedules affect profile operations, so read-only users may view/export backups but cannot change automation.
if not profile_id or not auth.can_write_profile(int(profile_id), user_id):
raise PermissionError("No write access to profile")
current = get_auto_backup_settings(user_id, backup_type, profile_id)
settings = {
**current,