rephrase logged out user invite accept message to clarify that the

invite was accepted
This commit is contained in:
Gregor Vostrak
2026-05-20 22:10:10 +02:00
parent 0ba20fd24c
commit 433a6f3770
3 changed files with 7 additions and 5 deletions

View File

@@ -51,10 +51,10 @@ class OrganizationInvitationController extends Controller
// Logged out — banner on /login.
if (! Auth::check()) {
return redirect(route('login'))
->with('bannerText', __('Please log in to finish joining the :organization organization.', [
->with('bannerText', __('Great! You have accepted the invitation to join the :organization organization. Please log in to access it.', [
'organization' => $organization->name,
]))
->with('bannerStyle', 'info');
->with('bannerStyle', 'success');
}
// Logged in — banner on /dashboard.

View File

@@ -83,7 +83,9 @@ test.describe('invitation accept banners', () => {
const banner = inviteePage.getByTestId('banner');
await expect(banner).toBeVisible();
await expect(banner).toContainText(/Please log in to finish joining the .* organization\./);
await expect(banner).toContainText(
/Great! You have accepted the invitation to join the .* organization\. Please log in to access it\./
);
// Logging in lands the invitee on the dashboard — they were already added silently
// by the accept controller, so the inviter's members list shows them.

View File

@@ -131,8 +131,8 @@ class OrganizationInvitationEndpointTest extends EndpointTestAbstract
// Assert
$response->assertValid();
$response->assertRedirect(route('login'));
$response->assertSessionHas('bannerText', 'Please log in to finish joining the '.$user->organization->name.' organization.');
$response->assertSessionHas('bannerStyle', 'info');
$response->assertSessionHas('bannerText', 'Great! You have accepted the invitation to join the '.$user->organization->name.' organization. Please log in to access it.');
$response->assertSessionHas('bannerStyle', 'success');
// Member was added silently — invitation is consumed.
$this->assertDatabaseHas(Member::class, [
'user_id' => $invitee->getKey(),