mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-app.git
synced 2026-06-17 16:40:31 +00:00
✨ Implement leadership-based permissions for Meetup management
- 🔒 Restrict event creation, editing, and deletion to Meetup leaders (`is_leader`) and creators for consistency across APIs, frontend, and MCP. - ➕ Add new APIs for leader delegation: assign/remove Meetup leaders via `meetup_user.is_leader`. - 🛠️ Replace loose member checks with specific leadership checks in policies, controllers, and views. - 🧪 Add exhaustive tests to ensure only eligible leaders execute critical actions (e.g., event creation/edit, Meetup updates). - 🔄 Refactor pivot relationships and models (`leadByMe`, `isLeader`) for explicit leadership handling. - ✨ Introduce artisan command `meetups:promote-existing-leaders` to transition legacy data.
This commit is contained in:
@@ -179,15 +179,20 @@ class extends Component {
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex flex-row items-center gap-2 w-full sm:w-auto">
|
||||
<flux:button
|
||||
:href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
variant="primary" icon="calendar" size="xs">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
<flux:button :href="route_with_country('meetups.edit', ['meetup' => $meetup])"
|
||||
size="xs" variant="ghost" icon="pencil" class="w-full sm:w-auto">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
{{-- Termine & Stammdaten nur für Leader dieses Meetups
|
||||
(meetup_user.is_leader); Mitglieder ohne Leaderschaft
|
||||
können das Meetup nur aus „Meine“ entfernen. --}}
|
||||
@if($meetup->pivot->is_leader)
|
||||
<flux:button
|
||||
:href="route_with_country('meetups.events.create', ['meetup' => $meetup])"
|
||||
variant="primary" icon="calendar" size="xs">
|
||||
{{ __('Neues Event erstellen') }}
|
||||
</flux:button>
|
||||
<flux:button :href="route_with_country('meetups.edit', ['meetup' => $meetup])"
|
||||
size="xs" variant="ghost" icon="pencil" class="w-full sm:w-auto">
|
||||
{{ __('Bearbeiten') }}
|
||||
</flux:button>
|
||||
@endif
|
||||
<flux:modal.trigger :name="'remove-meetup-' . $meetup->id">
|
||||
<flux:button class="cursor-pointer" size="xs" variant="danger"
|
||||
icon="trash"></flux:button>
|
||||
|
||||
Reference in New Issue
Block a user