add konto und konto optionen

This commit is contained in:
salam committed 2025-09-06 17:56:57 +02:00
1 parent 81370e9706
commit b005c7677e
89 files changed
+4406 -7

No files matched your search

+108
View File
@@ -0,0 +1,108 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\Gutachter;
use Illuminate\Auth\Access\HandlesAuthorization;
class GutachterPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_gutachters::gutachter');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Gutachter $gutachter): bool
{
return $user->can('view_gutachters::gutachter');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_gutachters::gutachter');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Gutachter $gutachter): bool
{
return $user->can('update_gutachters::gutachter');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Gutachter $gutachter): bool
{
return $user->can('delete_gutachters::gutachter');
}
/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_gutachters::gutachter');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, Gutachter $gutachter): bool
{
return $user->can('force_delete_gutachters::gutachter');
}
/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_gutachters::gutachter');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, Gutachter $gutachter): bool
{
return $user->can('restore_gutachters::gutachter');
}
/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_gutachters::gutachter');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, Gutachter $gutachter): bool
{
return $user->can('replicate_gutachters::gutachter');
}
/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_gutachters::gutachter');
}
}
+108
View File
@@ -0,0 +1,108 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\Konto;
use Illuminate\Auth\Access\HandlesAuthorization;
class KontoPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_kontos::konto');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Konto $konto): bool
{
return $user->can('view_kontos::konto');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_kontos::konto');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Konto $konto): bool
{
return $user->can('update_kontos::konto');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Konto $konto): bool
{
return $user->can('delete_kontos::konto');
}
/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_kontos::konto');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, Konto $konto): bool
{
return $user->can('force_delete_kontos::konto');
}
/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_kontos::konto');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, Konto $konto): bool
{
return $user->can('restore_kontos::konto');
}
/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_kontos::konto');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, Konto $konto): bool
{
return $user->can('replicate_kontos::konto');
}
/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_kontos::konto');
}
}
+108
View File
@@ -0,0 +1,108 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\Kontooptionen;
use Illuminate\Auth\Access\HandlesAuthorization;
class KontooptionenPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Kontooptionen $kontooptionen): bool
{
return $user->can('view_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Kontooptionen $kontooptionen): bool
{
return $user->can('update_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Kontooptionen $kontooptionen): bool
{
return $user->can('delete_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, Kontooptionen $kontooptionen): bool
{
return $user->can('force_delete_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, Kontooptionen $kontooptionen): bool
{
return $user->can('restore_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, Kontooptionen $kontooptionen): bool
{
return $user->can('replicate_kontooptionens::kontooptionen');
}
/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_kontooptionens::kontooptionen');
}
}
+108
View File
@@ -0,0 +1,108 @@
<?php
namespace App\Policies;
use App\Models\User;
use App\Models\Permission;
use Illuminate\Auth\Access\HandlesAuthorization;
class PermissionPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_permissions::permission');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Permission $permission): bool
{
return $user->can('view_permissions::permission');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->can('create_permissions::permission');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Permission $permission): bool
{
return $user->can('update_permissions::permission');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Permission $permission): bool
{
return $user->can('delete_permissions::permission');
}
/**
* Determine whether the user can bulk delete.
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_permissions::permission');
}
/**
* Determine whether the user can permanently delete.
*/
public function forceDelete(User $user, Permission $permission): bool
{
return $user->can('force_delete_permissions::permission');
}
/**
* Determine whether the user can permanently bulk delete.
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_permissions::permission');
}
/**
* Determine whether the user can restore.
*/
public function restore(User $user, Permission $permission): bool
{
return $user->can('restore_permissions::permission');
}
/**
* Determine whether the user can bulk restore.
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_permissions::permission');
}
/**
* Determine whether the user can replicate.
*/
public function replicate(User $user, Permission $permission): bool
{
return $user->can('replicate_permissions::permission');
}
/**
* Determine whether the user can reorder.
*/
public function reorder(User $user): bool
{
return $user->can('reorder_permissions::permission');
}
}
+144
View File
@@ -0,0 +1,144 @@
<?php
namespace App\Policies;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class UserPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @param \App\Models\User $user
* @return bool
*/
public function viewAny(User $user): bool
{
return $user->can('view_any_users::user');
}
/**
* Determine whether the user can view the model.
*
* @param \App\Models\User $user
* @return bool
*/
public function view(User $user): bool
{
return $user->can('view_users::user');
}
/**
* Determine whether the user can create models.
*
* @param \App\Models\User $user
* @return bool
*/
public function create(User $user): bool
{
return $user->can('create_users::user');
}
/**
* Determine whether the user can update the model.
*
* @param \App\Models\User $user
* @return bool
*/
public function update(User $user): bool
{
return $user->can('update_users::user');
}
/**
* Determine whether the user can delete the model.
*
* @param \App\Models\User $user
* @return bool
*/
public function delete(User $user): bool
{
return $user->can('delete_users::user');
}
/**
* Determine whether the user can bulk delete.
*
* @param \App\Models\User $user
* @return bool
*/
public function deleteAny(User $user): bool
{
return $user->can('delete_any_users::user');
}
/**
* Determine whether the user can permanently delete.
*
* @param \App\Models\User $user
* @return bool
*/
public function forceDelete(User $user): bool
{
return $user->can('force_delete_users::user');
}
/**
* Determine whether the user can permanently bulk delete.
*
* @param \App\Models\User $user
* @return bool
*/
public function forceDeleteAny(User $user): bool
{
return $user->can('force_delete_any_users::user');
}
/**
* Determine whether the user can restore.
*
* @param \App\Models\User $user
* @return bool
*/
public function restore(User $user): bool
{
return $user->can('restore_users::user');
}
/**
* Determine whether the user can bulk restore.
*
* @param \App\Models\User $user
* @return bool
*/
public function restoreAny(User $user): bool
{
return $user->can('restore_any_users::user');
}
/**
* Determine whether the user can bulk restore.
*
* @param \App\Models\User $user
* @return bool
*/
public function replicate(User $user): bool
{
return $user->can('replicate_users::user');
}
/**
* Determine whether the user can reorder.
*
* @param \App\Models\User $user
* @return bool
*/
public function reorder(User $user): bool
{
return $user->can('reorder_users::user');
}
}