Repository navigation
[agent] Allow revoked public share links to be reactivated - #416
DenizAltunkapan merged 2 commits into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Agent review
Suggestion: approve. I did not find any high-confidence correctness, security, regression, or missing-test issues in this diff.
Generated by Pull Request Review for #416 · copilot · auto · 17.7 AIC · ⌖ 0.512 AIC · ⊞ 7.3K
There was a problem hiding this comment.
🟡 Changes recommended
A 5xx reactivation failure still triggers the global interceptor’s /error redirect, preventing the local handler from showing the failure toast while keeping the revoked row visible.
1 open issue
What changed in this PR
Adds the frontend reactivation flow for revoked public share links, addressing the UI portion of #414. Restoring access through the original link depends on the Cloud provider’s reactivation endpoint.
Changes:
- Adds a service method to request reactivation.
- Shows a confirmation-gated Reactivate action, blocks expired links, and updates row status on success.
- Revises revoke confirmation wording and adds service and component tests.
| File | Description |
|---|---|
| frontend/src/app/services/cloud.service.ts | Adds the reactivation POST request. |
| frontend/src/app/services/cloud.service.spec.ts | Tests the reactivation endpoint and HTTP method. |
| frontend/src/app/pages/cloud/shared-links/shared-links.component.ts | Adds eligibility checks, confirmation, status updates, and failure handling. |
| frontend/src/app/pages/cloud/shared-links/shared-links.component.spec.ts | Tests confirmation, success, failure, and eligibility guards. |
| frontend/src/app/pages/cloud/shared-links/shared-links.component.html | Shows Reactivate for revoked links and disables it when ineligible. |
Review effort: Balanced
| error: () => | ||
| this.toast.error( | ||
| 'Reactivation failed', | ||
| 'The share link could not be reactivated.', | ||
| ), |
There was a problem hiding this comment.
Agent review
Suggestion: approve. I did not find any high-confidence correctness, security, regression, or missing-test issues in this diff.
Generated by Pull Request Review for #416 · copilot · auto · 14.1 AIC · ⌖ 0.512 AIC · ⊞ 7.3K
47cf0b4 to
893326c
Compare
There was a problem hiding this comment.
Agent review
Suggestion: approve. I did not find any high-confidence correctness, security, regression, or missing-test issues in this diff.
Generated by Pull Request Review for #416 · copilot · auto · 10.5 AIC · ⌖ 0.509 AIC · ⊞ 7.3K

Summary
Allow owners to reactivate revoked public share links while retaining the original URL and password. The share-links view confirms reactivation, updates the row immediately, handles errors, and prevents reactivation after expiry or deletion. Never-expiring links can be revoked again after reactivation.
The management list no longer constructs a share URL from an opaque link ID. The original URL is returned only when a link is created.
Backend dependency
Vault-Web/cloud-page#196 adds the owner-scoped reactivation endpoint and must be merged before this PR. It preserves the existing token, password, expiry, and access history, and rejects active, expired, deleted, and other users' links.
Verification
Fixes #414