rights system
This commit is contained in:
@@ -96,6 +96,7 @@ function FahrzeugBuchungen() {
|
||||
const notification = useNotification();
|
||||
const canCreate = hasPermission('kalender:create_bookings');
|
||||
const canWrite = hasPermission('kalender:edit_bookings');
|
||||
const canCancelOwn = hasPermission('kalender:cancel_own_bookings');
|
||||
const canChangeBuchungsArt = hasPermission('kalender:manage_categories');
|
||||
|
||||
// ── Week navigation ────────────────────────────────────────────────────────
|
||||
@@ -691,7 +692,7 @@ function FahrzeugBuchungen() {
|
||||
Von: {detailBooking.gebucht_von_name}
|
||||
</Typography>
|
||||
)}
|
||||
{(canWrite || detailBooking.gebucht_von === user?.id) && (
|
||||
{(canWrite || (canCancelOwn && detailBooking.gebucht_von === user?.id)) && (
|
||||
<Box sx={{ mt: 1.5, display: 'flex', gap: 1 }}>
|
||||
{canWrite && (
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user