Skip to content

feat(dashboards): reserve direct deletion for full access - #29076

Merged
sdolidze merged 1 commit into
mainfrom
spk-2067
Sep 11, 2026
Merged

feat(dashboards): reserve direct deletion for full access#29076
sdolidze merged 1 commit into
mainfrom
spk-2067

Conversation

@sdolidze

Copy link
Copy Markdown
Contributor

Closes: https://linear.app/lightdash/issue/SPK-2067

Summary

Direct dashboard Can edit grants allow dashboard maintenance without authorizing deletion of the dashboard itself. Full access retains deletion and sharing management, subject to existing project capabilities and content protections.

How it works

A shared deletion-access filter excludes non-admin direct dashboard grants while preserving independent inherited access. Dashboard deletion, soft deletion, and the dashboard/list menus use this filter. Editing still uses the original access rows, including for adding and removing tiles. The sharing dialog explains the distinction.

Direct Can edit   → edit dashboard contents
Direct Full access → edit + delete + manage sharing
Other qualifying permissions → retain deletion rights

Regression analysis

  • Existing direct editors lose deletion only when no other permission authorizes it. This is an intentional permission change.
  • Space-editor rights, additive user/group and custom-role permissions, and project capability ceilings retain their existing behavior.
  • Other content types, verified/Git-backed protections, and separate trash-management/restore permissions are unchanged.
  • Bulk deletion uses the same service checks and reports unauthorized items as skipped. No migration or scope vocabulary change is needed.

Test plan

  • Before: a real direct Editor deleted a private dashboard with HTTP 200; four new service regression cases failed.
  • After: Editor GET/PATCH return 200 and DELETE returns 403. User/group Full access and inherited space Editor deletion succeed.
  • Exercised hard and soft deletion on the local API; confirmed soft deletion in Postgres and restored local configuration afterward.
  • Mixed bulk deletion deletes the Full-access item and skips the Editor-only item.
  • Chrome DevTools: dashboard and Shared with me menus omit Delete for Editor and show it for Full access; sharing copy verified.
  • Common authorization and role parity: 44 passed, one pre-existing skipped test. Backend service/access/verification suites: 183 passed. Direct-access modal: 18 passed.
  • Common, backend, and frontend typechecks and lint pass; changed-file formatting and diff checks pass.

@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

SPK-2067

@rainbow-machine

rainbow-machine Bot commented Sep 11, 2026

Copy link
Copy Markdown

🌈 The environment for this PR was shut down when it closed. Reopening the PR brings it back at the same URL.

@github-actions

github-actions Bot commented Sep 11, 2026

Copy link
Copy Markdown

🛡️ Upgrade safety for self-hosted customers

Comparing against main (e24853a471).

  • Safe to upgrade normally. No downtime needed.
  • No database changes in this release.

What we looked at

What Result
Database changes none
REST API no breaking changes
MCP tools no breaking changes
Config / environment no breaking changes
Declared breaking changes none
Upgrade notes none
Technical details (raw JSON)
{
  "schemaVersion": "2",
  "version": "pr-29076",
  "previousVersion": "e24853a471",
  "releaseDate": "2026-09-11T14:05:04.392Z",
  "migrations": {
    "present": false,
    "count": 0,
    "coreCount": 0,
    "eeCount": 0,
    "files": []
  },
  "compatibility": {
    "rollingUpdateSafe": true,
    "recommendedStrategy": "RollingUpdate"
  },
  "api": {
    "rest": {
      "checked": true,
      "breaking": false,
      "changes": [],
      "breakingCount": 0,
      "advisories": [],
      "advisoryCount": 0
    },
    "mcp": {
      "checked": true,
      "breaking": false,
      "changes": [],
      "breakingCount": 0,
      "advisories": [],
      "advisoryCount": 0
    }
  },
  "config": {
    "checked": true,
    "breaking": false,
    "changes": []
  },
  "upgrade": {
    "minPreviousVersion": null,
    "requiredStops": []
  },
  "declaredBreaks": []
}

Automated upgrade-safety check. Once merged, it ships a small release-safety.json with the release so customers’ upgrade automation can read it. It covers database, API, and config/environment changes.

@github-actions

Copy link
Copy Markdown

🧪 Test Selection

✅ Tests that will run

Test Description
Preview Environment Deploys a preview environment for testing
Frontend E2E Tests Runs Cypress app tests
Backend API Tests Runs Vitest API tests
CLI Tests Runs CLI integration and dbt version tests

⏭️ Tests skipped (no relevant file changes detected)

Test How to trigger manually
Timezone Tests Add test-timezone to PR description

Tip: Add test-all to your PR description to run all tests.

@github-actions

Copy link
Copy Markdown

Your preview environment pr-29076 has been deployed.

Preview environment endpoints are available at:

@github-actions

Copy link
Copy Markdown

Preview Environment

🌐 URL: https://lightdash-preview-pr-29076.lightdash.okteto.dev

📋 Logs: View in GCP Console

🔧 SSH: ./scripts/okteto-ssh.sh 29076

@sdolidze
sdolidze merged commit 972bb26 into main Sep 11, 2026
33 checks passed
@sdolidze
sdolidze deleted the spk-2067 branch September 11, 2026 14:25
lightdash-bot pushed a commit that referenced this pull request Sep 11, 2026
# [2.199.0](2.198.6...2.199.0) (2026-09-11)

### Bug Fixes

* **preview:** copy dashboards before their charts so preview content copy needs no per-row updates ([#29061](#29061)) ([2805fa7](2805fa7))

### Features

* add roadmap link to main navbar ([#29062](#29062)) ([7097378](7097378))
* **audit:** record direct access grant provenance ([#29040](#29040)) ([03a29e7](03a29e7))
* **dashboards:** reserve direct deletion for full access ([#29076](#29076)) ([972bb26](972bb26))
@lightdash-bot

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.199.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants