Skip to content

[agent] Allow revoked public share links to be reactivated - #416

Merged
DenizAltunkapan merged 2 commits into
mainfrom
agent/issue-414-reactivate-share-links-e00630aa73cd7a6b
Nov 6, 2026
Merged

DenizAltunkapan merged 2 commits into
mainfrom
agent/issue-414-reactivate-share-links-e00630aa73cd7a6b

Conversation

@vault-web-agents

@vault-web-agents vault-web-agents Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Frontend lint, Prettier check, production build, and 17 focused Karma tests pass.
  • Backend full test suite and Spotless check pass.
  • Local HTTP flow verified: revoke makes the original URL unavailable; reactivation restores that URL with the same password. A wrong password remains rejected.

Fixes #414

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vault-web-agents vault-web-agents Bot added the agent-managed Pull request opened by an agent. Needs human review before merge. label Nov 4, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@DenizAltunkapan
DenizAltunkapan marked this pull request as ready for review November 6, 2026 10:31
@DenizAltunkapan
DenizAltunkapan self-requested a review as a code owner November 6, 2026 10:31
Copilot AI balanced review requested due to automatic review settings November 6, 2026 10:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment on lines +218 to +222
error: () =>
this.toast.error(
'Reactivation failed',
'The share link could not be reactivated.',
),

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@DenizAltunkapan
DenizAltunkapan force-pushed the agent/issue-414-reactivate-share-links-e00630aa73cd7a6b branch from 47cf0b4 to 893326c Compare November 6, 2026 10:50

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@DenizAltunkapan
DenizAltunkapan merged commit bc88b90 into main Nov 6, 2026
9 checks passed
@DenizAltunkapan
DenizAltunkapan deleted the agent/issue-414-reactivate-share-links-e00630aa73cd7a6b branch November 6, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-managed Pull request opened by an agent. Needs human review before merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Allow revoked public share links to be reactivated

2 participants