feat: invitation resend, WorkspaceMemberRole enum, configurable expiry #70

Open
Charon wants to merge 1 commit from feat/invitation-and-role-improvements into dev
Member

Summary

  • #23 Add resend() method to WorkspaceInvitation — regenerates token, resets expiry, re-sends notification
  • #24 Create WorkspaceMemberRole backed enum (PHP 8.1+) with label() and colour() helpers; deprecate ROLE_* constants and update internal references
  • #25 Replace hardcoded 7-day invitation expiry with config('tenant.invitation_expiry_days', 7) in Workspace::invite() and WorkspaceInvitation::resend()

Fixes #23
Fixes #24
Fixes #25

Test plan

  • Verify WorkspaceInvitation::resend() generates a new token and updates expires_at
  • Verify WorkspaceMemberRole enum cases match legacy constants
  • Verify WorkspaceMember::getDisplayRole() and getRoleColour() return correct values via enum
  • Verify Workspace::invite() uses config value when no explicit expiry passed
  • Verify existing invitation tests still pass

🤖 Generated with Claude Code

## Summary - **#23** Add `resend()` method to `WorkspaceInvitation` — regenerates token, resets expiry, re-sends notification - **#24** Create `WorkspaceMemberRole` backed enum (PHP 8.1+) with `label()` and `colour()` helpers; deprecate `ROLE_*` constants and update internal references - **#25** Replace hardcoded 7-day invitation expiry with `config('tenant.invitation_expiry_days', 7)` in `Workspace::invite()` and `WorkspaceInvitation::resend()` Fixes #23 Fixes #24 Fixes #25 ## Test plan - [ ] Verify `WorkspaceInvitation::resend()` generates a new token and updates `expires_at` - [ ] Verify `WorkspaceMemberRole` enum cases match legacy constants - [ ] Verify `WorkspaceMember::getDisplayRole()` and `getRoleColour()` return correct values via enum - [ ] Verify `Workspace::invite()` uses config value when no explicit expiry passed - [ ] Verify existing invitation tests still pass 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Charon added 1 commit 2026-03-24 13:40:36 +00:00
- Add resend() method to WorkspaceInvitation that regenerates the token,
  resets expiry to configured days, and re-sends the notification (#23)
- Create WorkspaceMemberRole backed enum (PHP 8.1+) with label() and
  colour() helpers; deprecate ROLE_* string constants on WorkspaceMember
  and update internal references to use the enum (#24)
- Replace hardcoded 7-day invitation expiry with
  config('tenant.invitation_expiry_days', 7) in both Workspace::invite()
  and WorkspaceInvitation::resend() (#25)

Fixes #23
Fixes #24
Fixes #25

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/invitation-and-role-improvements:feat/invitation-and-role-improvements
git checkout feat/invitation-and-role-improvements

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.

git checkout dev
git merge --no-ff feat/invitation-and-role-improvements
git checkout feat/invitation-and-role-improvements
git rebase dev
git checkout dev
git merge --ff-only feat/invitation-and-role-improvements
git checkout feat/invitation-and-role-improvements
git rebase dev
git checkout dev
git merge --no-ff feat/invitation-and-role-improvements
git checkout dev
git merge --squash feat/invitation-and-role-improvements
git checkout dev
git merge --ff-only feat/invitation-and-role-improvements
git checkout dev
git merge feat/invitation-and-role-improvements
git push origin dev
Sign in to join this conversation.
No description provided.