mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-18 04:50:30 +00:00
✨ Add leader-based permissions to Meetup event tests and editable scope
- 🔒 Ensure leader users are required for Meetup event tests to simulate accurate permissions. - ➕ Add `editableBy` scope to `MeetupEvent` model for consistent editable event handling. - 🛠️ Refactor `mine` API endpoint and MCP tool to leverage `editableBy` scope. - 🧪 Update tests to verify leader-based accessibility for Meetup events.
This commit is contained in:
@@ -11,7 +11,7 @@ use App\Models\User;
|
||||
|
||||
it('lets an authenticated user create a meetup event and stamps created_by', function () {
|
||||
$user = User::factory()->create();
|
||||
$meetup = Meetup::factory()->create();
|
||||
$meetup = Meetup::factory()->create(['created_by' => $user->id]);
|
||||
|
||||
$response = EinundzwanzigServer::actingAs($user)->tool(CreateMeetupEventTool::class, [
|
||||
'meetup_id' => $meetup->id,
|
||||
|
||||
Reference in New Issue
Block a user