Skip to content

Make WorkBench and Batch Edit transfer checks context aware#7834

Open
acwhite211 wants to merge 2 commits intomainfrom
issue-7810
Open

Make WorkBench and Batch Edit transfer checks context aware#7834
acwhite211 wants to merge 2 commits intomainfrom
issue-7810

Conversation

@acwhite211
Copy link
Member

Fixes #7810

Change Owner could be hidden even when a user had the correct dataset transfer permission, because the UI also depended on unrelated SpecifyUser read access.

This change makes dataset ownership transfer context aware and scoped to the active dataset type. WorkBench datasets use /workbench/dataset transfer permission. Batch Edit datasets use /batch_edit/dataset transfer permission. Transfer recipients are loaded from a dataset scoped endpoint instead of querying SpecifyUser directly from the front-end.

Checklist

  • Self-review the PR after opening it to make sure the changes look good and
    self-explanatory (or properly documented)
  • Add relevant issue to release milestone
  • Add pr to documentation list
  • Add automated tests
  • Add a reverse migration if a migration is present in the PR

Testing instructions

  • Keep the RBGE Researcher role assigned to the test user so the dataset can be opened.
  • Assign WB Transfer (No BE) to the test user.
  • Confirm the user has WorkBench > Transfer and does not have Batch Edit > Transfer.
  • Log in as that user.
  • Open a standard WorkBench dataset (not a Batch Edit dataset).
  • Click Tools.
  • Verify the Change Owner button is visible.
  • Click Change Owner and verify the dialog opens and the recipient list loads.
  • Close the dialog without making changes.
  • With the same roles still assigned, open a Batch Edit dataset.
  • Click Tools.
  • Verify Change Owner is not shown for Batch Edit when Batch Edit > Transfer is missing.
  • Add the role WB Transfer (or otherwise grant Batch Edit > Transfer) to the same user.
  • Reopen the Batch Edit dataset and click Tools.
  • Verify Change Owner is now shown for Batch Edit as well.

@acwhite211 acwhite211 added this to the 7.12.1 milestone Mar 20, 2026
@acwhite211 acwhite211 requested review from a team March 20, 2026 22:25
@github-project-automation github-project-automation bot moved this to 📋Back Log in General Tester Board Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 📋Back Log

Development

Successfully merging this pull request may close these issues.

WorkBench Transfer Ownership Permission Not Context Aware

1 participant