feat: add workspace ownership transfer #82
No reviewers
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-tenant#82
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "feat/workspace-ownership-transfer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a
transferOwnership(User $newOwner, ?User $actingUser = null)method to the Workspace model that allows the current owner to transfer workspace ownership to another existing member.Changes
Models/Workspace.php-- NewtransferOwnership()method that:WorkspaceOwnershipTransferredevent on successWorkspaceOwnershipExceptionfor authorisation and validation failuresEvents/WorkspaceOwnershipTransferred.php-- New event dispatched after successful transfer, carrying workspace, previous owner, and new ownerExceptions/WorkspaceOwnershipException.php-- New exception with named constructors for specific failure scenarios (notAMember,alreadyOwner,noCurrentOwner,unauthorised)tests/Feature/WorkspaceOwnershipTransferTest.php-- 9 test cases covering happy path, authorisation, validation, team assignment updates, and event dispatchingFixes #35
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.