OpenFn / OpenFn/lightning

Let project owners cancel a scheduled deletion themselves

Open
#4,673 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

sandboxes and sync ux/ui improvement
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

Context

Soft-delete recovery is inconsistent:

  • Credentials. Owner has an inline Cancel deletion link.
  • Sandboxes. Owner/admins cancel from the "Scheduled for deletion" section in the sandbox list during the grace period.
  • Projects. Only superusers can cancel, from /settings/projects. Owners have to escalate.

If an owner can schedule a project's deletion, they should be able to cancel it within the grace period without pinging a superuser.

Proposal

Let :owner cancel their own project's scheduled deletion during the grace period (matching :delete_project's gate).

Things to consider

  • Once scheduled, the user is locked out of the project. They need somewhere outside it to see and cancel: the Projects overview page (/projects), or a one-off recovery link in the deletion email.
  • Backend is mostly there. Lightning.Projects.cancel_scheduled_deletion/1 exists but has no permission gate; anyone with the project id can call it. Needs wiring to the policy.
  • Pair with an audit log entry (see #4677) so "delete then cancel" leaves a trail.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Lightning.Projects.cancel_scheduled_deletion/1 and trace the project policy, then inspect the Projects overview at /projects and the existing deletion flows. Verify how owners reach the action while locked out of the project. Done means an owner can cancel during the grace period, unauthorized users cannot, and the audit-log pairing with #4677 is accounted for.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
authorization, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.