279 Commits

Author SHA1 Message Date
Nico
6553046767 fix: cli not running (#703) 2026-03-23 22:12:30 +01:00
Nico
05dd440dea fix(restic): separate error summary from diagnostic details (#694) 2026-03-21 20:50:23 +01:00
Nico
618f37e250 fix(notifications): fix telegram shoutrrr URL encoding (#691)
Closes #690
2026-03-21 20:38:45 +01:00
Nicolas Meienberger
aa23967329 fix: encrypt ntfy access token at rest 2026-03-20 20:37:51 +01:00
Nicolas Meienberger
bad5f78991 fix(smb): use long form params username / password instead of user / pass
#674
2026-03-20 19:29:40 +01:00
Nico
a039bb478e fix: separate raw include paths and patterns (#683)
Separate include patters and included path cleanly to avoid path with special characters to be expanded. Closes https://github.com/nicotsx/zerobyte/discussions/680

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * Added ability to select specific directories and paths for inclusion in backup schedules, separate from pattern-based rules.

* **Bug Fixes & Improvements**
  * Automatically migrates existing backup configurations to work with the new path selection system.
  * Enhanced backup restoration to properly handle both selected paths and pattern-based inclusions.

* **Chores**
  * Updated database schema to support path selections in backup schedules.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-20 19:27:54 +01:00
Nico
f6f17cd61c fix: backup progress use simple polling & cache (#678)
#593
2026-03-18 20:25:30 +01:00
Nico
429b69ec92 fix: show back warnings logs and surface in UI (#677)
fix: show back warnings logs and surface in UI

#544

chore: fix dev login issue
2026-03-18 20:21:14 +01:00
Nico
e39220c024 fix: allow quoted urls in env variables (#676) 2026-03-17 22:09:22 +01:00
Nicolas Meienberger
2d10da72f6 refactor(volume-backend): assert mounted helper 2026-03-15 12:03:27 +01:00
Nicolas Meienberger
5f7f2005fa refactor(notifications): extract config secret mapping 2026-03-15 11:51:17 +01:00
Nicolas Meienberger
a2d34a027e refactor(notifications): use native URL builder 2026-03-15 11:40:03 +01:00
Nicolas Meienberger
b298524663 test: disable rate limiting in testing 2026-03-13 23:05:14 +01:00
Nico
7473c29948 feat: protect restores that would overwrite important internal path (#663) 2026-03-13 21:33:37 +01:00
Nico
9632c77177 feat: add a trust proxy env to control whether to trust incoming x-forwarded-for headers (#662) 2026-03-13 19:08:08 +01:00
Nicolas Meienberger
66f95dcd8e fix: reject include patterns that are not in the volume root 2026-03-12 20:17:40 +01:00
Nicolas Meienberger
469f0d6c4e fix(dump): content-disposition header with special characters 2026-03-12 19:17:32 +01:00
Nico
d74f516336 feat: file-based provisionning of volumes and repos (#656)
* feat: file-based provisionning of volumes and repos

docs: provisioning example

chore: ui improvements

* chore: ci issues
2026-03-12 18:31:42 +01:00
Nicolas Meienberger
b132ad6df5 fix: add additional chmod after file write
Closes #478 The mode option of fs.writeFile does not reliably apply
permissions on all filesystems. On Synology NAS Docker volumes (btrfs),
the file ends up with 0755 permissions instead of 0600, causing SSH to
refuse the key.
2026-03-12 18:01:45 +01:00
Nico
332e5bffda refactor: extract restic in core package (#651)
* refactor: extract restic in core package

* chore: add turbo task runner

* refactor: split server utils

* chore: simplify withDeps signature and fix non-null assertion
2026-03-11 21:56:07 +01:00
Nicolas Meienberger
d07be16fc6 fix(rclone): use correct timeout in seconds 2026-03-11 19:19:06 +01:00
Nicolas Meienberger
b156d6154e fix: rebase issues 2026-03-11 19:05:50 +01:00
Nico
e8eae7dce6 fix: dump snapshot (#646)
Closes #602
2026-03-11 18:53:58 +01:00
Nico
55dbcf0eb3 refactor: move from arktype to zod (#637)
chore: gen api-client
2026-03-11 18:53:58 +01:00
Nico
b35a20f43d feat: light theme (#638) 2026-03-11 18:53:15 +01:00
Nico
1b948ed41e fix: single item file restore (#634)
fix: single item file restore

test(e2e): restore single file at custom location  
  
Closes #633
2026-03-11 18:53:15 +01:00
Nicolas Meienberger
d640ad88b2 refactor: harden cron validation and fail early in case of wrong pattern 2026-03-11 18:53:15 +01:00
Vutsal
3fa793bef6 Refactor scheduler to use CronExpressionParser 2026-03-11 18:53:15 +01:00
Nico
3e50e37e02 chore: bump drizzle to beta-16 (#622)
chore: bump drizzle to beta-16

test: increase test coverage
2026-03-05 22:23:45 +01:00
Nicolas Meienberger
c2ed9e3693 refactor: correctly delete orphan sessions after idp deletion 2026-03-05 21:02:56 +01:00
Nico
c1e8036323 fix: sso cross org link with valid invite (#621) 2026-03-05 20:21:24 +01:00
Nico
6769f5fa6c fix: run repo stats in background (#620)
Closes #614
2026-03-05 20:18:34 +01:00
Nicolas Meienberger
6f560ecae9 chore: api client gen 2026-03-04 22:00:04 +01:00
Nicolas Meienberger
157be2d6ab feat: custom flags allowlist 2026-03-04 19:42:08 +01:00
Nico
0c20473e30 refactor(sso): extract sso code into it's own module (#617) 2026-03-04 18:48:47 +01:00
Nico
2f253d4999 fix: move active session to an existing org, when deleting (#612)
### TL;DR

Added session cleanup logic to handle active organization reassignment when user organizations are deleted.

### What changed?

Enhanced the `cleanupUserOrganizations` method in `AuthService` to reassign active organizations for users whose current active organization is being deleted. The method now:

- Identifies users who are members of organizations being deleted
- Finds alternative organizations for each affected user
- Updates their sessions to use a fallback organization or null if no alternatives exist
- Wraps the entire operation in a database transaction for consistency

### How to test?

Run the new test suite:
```bash
bun test app/server/modules/auth/__tests__/auth.cleanup-user-organizations.test.ts
```

The test verifies that when a user's organization is deleted, other members' sessions are properly updated to use their remaining organization memberships as the active organization.

### Why make this change?

Prevents orphaned session references when organizations are deleted. Without this change, users could have sessions pointing to non-existent organizations as their active workspace, leading to potential application errors or inconsistent state.

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **Bug Fixes**
  * Improved organization deletion handling. When an organization is deleted, user sessions are now automatically reassigned to a valid fallback organization, ensuring session state consistency and preventing invalid organization references.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-04 18:48:47 +01:00
Nico
fc11432b87 feat: change email by cli (#611)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **New Features**
  * New CLI command to change user email addresses with impact preview and validation.

* **Accessibility**
  * Improved settings form with proper label-input associations and email field type validation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-04 18:48:47 +01:00
Nico
a24c6d825e refactor: sso utils (#608) 2026-03-04 18:48:47 +01:00
Nico
235706b230 fix(sso): prevent auto-linking with an existing account in a different org (#607)
* fix(sso): prevent auto-linking with an existing account in a different org

* chore: lint issue

* chore: bump @better-auth/sso
2026-03-04 18:48:47 +01:00
Nicolas Meienberger
5f6409e0a5 test: increase coverage for existing controllers 2026-03-04 18:48:47 +01:00
Nico
c606099104 test: use better-auth built-in test plugin (#599)
test: use better-auth built-in test plugin

refactor: map auth errors server side

refactor: native trusted providers callback usage

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **New Features**
  * Enhanced SSO authentication error messaging with specific guidance for different failure scenarios (account linking required, email verification needed, banned accounts, invite-only access).

* **Chores**
  * Updated authentication dependencies to version 1.5.0.

* **Tests**
  * Extended test coverage for SSO error code handling and authentication scenarios.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-04 18:48:47 +01:00
Nico
c5aacd30e3 feat: separate global admin page (#595) 2026-03-04 18:48:47 +01:00
Nico
12454ee401 fix: restic glob pattern in include (#594)
Closes #590

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

* **Tests**
  * Enhanced test coverage for backup pattern handling and anchoring
  * Added end-to-end scenarios validating include patterns, exclusion patterns, and exclude-if-present functionality

* **Refactor**
  * Updated pattern processing logic to improve relative path resolution for backup patterns
  * Improved asynchronous handling in backup initialization workflow

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-04 18:48:47 +01:00
Nico
29db09bb5b feat: OIDC (#564)
* feat: oidc

feat: organization switcher

refactor: org context

feat: invitations

GLM

* feat: link current account

* refactor: own page for sso registration

* feat: per-user account management

* refactor: code style

* refactor: user existing check

* refactor: restrict provider configuration to super admins only

* refactor: cleanup / pr review

* chore: fix lint issues

* chore: pr feedbacks

* test(e2e): automated tests for OIDC

* fix: check url first for sso provider identification

* fix: prevent oidc provider to be named "credential"
2026-03-04 18:48:00 +01:00
bcrooker
ef51d665c8 feat(backups): add custom restic params to backup schedules
Allows users to pass arbitrary restic flags via a new advanced section in the create/edit schedule form. Includes DB migration, schema update, DTO, service, and restic command changes.
2026-02-27 14:46:47 -05:00
Nico
942bf2b31b refactor: tests (#585)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

* **Tests**
  * Improved test infrastructure and organization across backup, repository, volume, and utility modules with streamlined mock setup and cleaner test patterns.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 19:54:25 +01:00
Nico
4a812a884b refactor(restic): split each command into its own file (#584)
refactor(restic): split each command into its own file

refactor: add missing await before promise expects

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **Tests**
  * Improved async assertion handling across test suites for enhanced test reliability
  * Expanded test coverage for backup, restore, and other core operations

* **Refactor**
  * Reorganized internal utility structure for improved code maintainability

* **Chores**
  * Updated linting configuration and TypeScript dependencies

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 19:51:24 +01:00
Nico
3113af8ce8 fix(repo): add a custom key after creation with the configured hostname (#583)
Closes #456
2026-02-26 19:46:25 +01:00
Nico
30f237dc1f fix(local-repo): automatically generate a subfolder for new local repos (#582)
Closes #562

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

## Release Notes

* **New Features**
  * Improved repository setup with context-aware descriptions for new vs. existing repositories
  * Enhanced path handling: unique identifiers automatically appended for new repositories, exact paths preserved when importing existing ones

* **Chores**
  * Updated documentation and build configuration

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-02-26 19:43:42 +01:00
Nicolas Meienberger
b1a0cdb195 chore: gen api-client 2026-02-25 23:19:34 +01:00