Initial commit for new repo
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m4s

This commit is contained in:
dhanabalan
2025-12-16 17:05:04 +05:30
commit 3f0d529640
862 changed files with 141157 additions and 0 deletions

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\AlertMailRule;
use App\Models\User;
class AlertMailRulePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any AlertMailRule');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, AlertMailRule $alertmailrule): bool
{
return $user->checkPermissionTo('view AlertMailRule');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create AlertMailRule');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, AlertMailRule $alertmailrule): bool
{
return $user->checkPermissionTo('update AlertMailRule');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, AlertMailRule $alertmailrule): bool
{
return $user->checkPermissionTo('delete AlertMailRule');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any AlertMailRule');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, AlertMailRule $alertmailrule): bool
{
return $user->checkPermissionTo('restore AlertMailRule');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any AlertMailRule');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, AlertMailRule $alertmailrule): bool
{
return $user->checkPermissionTo('replicate AlertMailRule');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder AlertMailRule');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, AlertMailRule $alertmailrule): bool
{
return $user->checkPermissionTo('force-delete AlertMailRule');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any AlertMailRule');
}
}

View File

@@ -0,0 +1,69 @@
<?php
namespace App\Policies;
use App\Models\Block;
use App\Models\User;
class BlockPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->hasPermissionTo('view-any Block');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Block $block): bool
{
return $user->hasPermissionTo('view Block');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->hasPermissionTo('create Block');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Block $block): bool
{
return $user->hasPermissionTo('update Block');
// return false;
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Block $block): bool
{
return $user->hasPermissionTo('delete Block');
// return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Block $block): bool
{
return $user->hasPermissionTo('restore Block');
// return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Block $block): bool
{
return $user->hasPermissionTo('force delete Block');
// return false;
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\CheckPointName;
use App\Models\User;
class CheckPointNamePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any CheckPointName');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, CheckPointName $checkpointname): bool
{
return $user->checkPermissionTo('view CheckPointName');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create CheckPointName');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, CheckPointName $checkpointname): bool
{
return $user->checkPermissionTo('update CheckPointName');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, CheckPointName $checkpointname): bool
{
return $user->checkPermissionTo('delete CheckPointName');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any CheckPointName');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, CheckPointName $checkpointname): bool
{
return $user->checkPermissionTo('restore CheckPointName');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any CheckPointName');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, CheckPointName $checkpointname): bool
{
return $user->checkPermissionTo('replicate CheckPointName');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder CheckPointName');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, CheckPointName $checkpointname): bool
{
return $user->checkPermissionTo('force-delete CheckPointName');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any CheckPointName');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\CheckPointTime;
use App\Models\User;
class CheckPointTimePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any CheckPointTime');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, CheckPointTime $checkpointtime): bool
{
return $user->checkPermissionTo('view CheckPointTime');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create CheckPointTime');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, CheckPointTime $checkpointtime): bool
{
return $user->checkPermissionTo('update CheckPointTime');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, CheckPointTime $checkpointtime): bool
{
return $user->checkPermissionTo('delete CheckPointTime');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any CheckPointTime');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, CheckPointTime $checkpointtime): bool
{
return $user->checkPermissionTo('restore CheckPointTime');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any CheckPointTime');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, CheckPointTime $checkpointtime): bool
{
return $user->checkPermissionTo('replicate CheckPointTime');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder CheckPointTime');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, CheckPointTime $checkpointtime): bool
{
return $user->checkPermissionTo('force-delete CheckPointTime');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any CheckPointTime');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ClassCharacteristic;
use App\Models\User;
class ClassCharacteristicPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ClassCharacteristic');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ClassCharacteristic $classcharacteristic): bool
{
return $user->checkPermissionTo('view ClassCharacteristic');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ClassCharacteristic');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ClassCharacteristic $classcharacteristic): bool
{
return $user->checkPermissionTo('update ClassCharacteristic');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ClassCharacteristic $classcharacteristic): bool
{
return $user->checkPermissionTo('delete ClassCharacteristic');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ClassCharacteristic');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ClassCharacteristic $classcharacteristic): bool
{
return $user->checkPermissionTo('restore ClassCharacteristic');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ClassCharacteristic');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ClassCharacteristic $classcharacteristic): bool
{
return $user->checkPermissionTo('replicate ClassCharacteristic');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ClassCharacteristic');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ClassCharacteristic $classcharacteristic): bool
{
return $user->checkPermissionTo('force-delete ClassCharacteristic');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ClassCharacteristic');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Company;
use App\Models\User;
class CompanyPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Company');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Company $company): bool
{
return $user->checkPermissionTo('view Company');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Company');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Company $company): bool
{
return $user->checkPermissionTo('update Company');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Company $company): bool
{
return $user->checkPermissionTo('delete Company');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Company');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Company $company): bool
{
return $user->checkPermissionTo('restore Company');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Company');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Company $company): bool
{
return $user->checkPermissionTo('replicate Company');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Company');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Company $company): bool
{
return $user->checkPermissionTo('force-delete Company');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Company');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Configuration;
use App\Models\User;
class ConfigurationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Configuration');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Configuration $configuration): bool
{
return $user->checkPermissionTo('view Configuration');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Configuration');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Configuration $configuration): bool
{
return $user->checkPermissionTo('update Configuration');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Configuration $configuration): bool
{
return $user->checkPermissionTo('delete Configuration');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Configuration');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Configuration $configuration): bool
{
return $user->checkPermissionTo('restore Configuration');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Configuration');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Configuration $configuration): bool
{
return $user->checkPermissionTo('replicate Configuration');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Configuration');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Configuration $configuration): bool
{
return $user->checkPermissionTo('force-delete Configuration');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Configuration');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\DeviceMaster;
use App\Models\User;
class DeviceMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any DeviceMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, DeviceMaster $devicemaster): bool
{
return $user->checkPermissionTo('view DeviceMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create DeviceMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, DeviceMaster $devicemaster): bool
{
return $user->checkPermissionTo('update DeviceMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, DeviceMaster $devicemaster): bool
{
return $user->checkPermissionTo('delete DeviceMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any DeviceMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, DeviceMaster $devicemaster): bool
{
return $user->checkPermissionTo('restore DeviceMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any DeviceMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, DeviceMaster $devicemaster): bool
{
return $user->checkPermissionTo('replicate DeviceMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder DeviceMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, DeviceMaster $devicemaster): bool
{
return $user->checkPermissionTo('force-delete DeviceMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any DeviceMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\DriverMaster;
use App\Models\User;
class DriverMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any DriverMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, DriverMaster $drivermaster): bool
{
return $user->checkPermissionTo('view DriverMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create DriverMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, DriverMaster $drivermaster): bool
{
return $user->checkPermissionTo('update DriverMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, DriverMaster $drivermaster): bool
{
return $user->checkPermissionTo('delete DriverMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any DriverMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, DriverMaster $drivermaster): bool
{
return $user->checkPermissionTo('restore DriverMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any DriverMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, DriverMaster $drivermaster): bool
{
return $user->checkPermissionTo('replicate DriverMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder DriverMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, DriverMaster $drivermaster): bool
{
return $user->checkPermissionTo('force-delete DriverMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any DriverMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\EbReading;
use App\Models\User;
class EbReadingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any EbReading');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, EbReading $ebreading): bool
{
return $user->checkPermissionTo('view EbReading');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create EbReading');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, EbReading $ebreading): bool
{
return $user->checkPermissionTo('update EbReading');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, EbReading $ebreading): bool
{
return $user->checkPermissionTo('delete EbReading');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any EbReading');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, EbReading $ebreading): bool
{
return $user->checkPermissionTo('restore EbReading');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any EbReading');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, EbReading $ebreading): bool
{
return $user->checkPermissionTo('replicate EbReading');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder EbReading');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, EbReading $ebreading): bool
{
return $user->checkPermissionTo('force-delete EbReading');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any EbReading');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\EquipmentMaster;
use App\Models\User;
class EquipmentMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any EquipmentMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, EquipmentMaster $equipmentmaster): bool
{
return $user->checkPermissionTo('view EquipmentMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create EquipmentMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, EquipmentMaster $equipmentmaster): bool
{
return $user->checkPermissionTo('update EquipmentMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, EquipmentMaster $equipmentmaster): bool
{
return $user->checkPermissionTo('delete EquipmentMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any EquipmentMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, EquipmentMaster $equipmentmaster): bool
{
return $user->checkPermissionTo('restore EquipmentMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any EquipmentMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, EquipmentMaster $equipmentmaster): bool
{
return $user->checkPermissionTo('replicate EquipmentMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder EquipmentMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, EquipmentMaster $equipmentmaster): bool
{
return $user->checkPermissionTo('force-delete EquipmentMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any EquipmentMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\GrMaster;
use App\Models\User;
class GrMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any GrMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, GrMaster $grmaster): bool
{
return $user->checkPermissionTo('view GrMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create GrMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, GrMaster $grmaster): bool
{
return $user->checkPermissionTo('update GrMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, GrMaster $grmaster): bool
{
return $user->checkPermissionTo('delete GrMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any GrMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, GrMaster $grmaster): bool
{
return $user->checkPermissionTo('restore GrMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any GrMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, GrMaster $grmaster): bool
{
return $user->checkPermissionTo('replicate GrMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder GrMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, GrMaster $grmaster): bool
{
return $user->checkPermissionTo('force-delete GrMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any GrMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\GuardName;
use App\Models\User;
class GuardNamePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any GuardName');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, GuardName $guardname): bool
{
return $user->checkPermissionTo('view GuardName');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create GuardName');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, GuardName $guardname): bool
{
return $user->checkPermissionTo('update GuardName');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, GuardName $guardname): bool
{
return $user->checkPermissionTo('delete GuardName');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any GuardName');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, GuardName $guardname): bool
{
return $user->checkPermissionTo('restore GuardName');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any GuardName');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, GuardName $guardname): bool
{
return $user->checkPermissionTo('replicate GuardName');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder GuardName');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, GuardName $guardname): bool
{
return $user->checkPermissionTo('force-delete GuardName');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any GuardName');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\GuardPatrolEntry;
use App\Models\User;
class GuardPatrolEntryPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any GuardPatrolEntry');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, GuardPatrolEntry $guardpatrolentry): bool
{
return $user->checkPermissionTo('view GuardPatrolEntry');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create GuardPatrolEntry');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, GuardPatrolEntry $guardpatrolentry): bool
{
return $user->checkPermissionTo('update GuardPatrolEntry');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, GuardPatrolEntry $guardpatrolentry): bool
{
return $user->checkPermissionTo('delete GuardPatrolEntry');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any GuardPatrolEntry');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, GuardPatrolEntry $guardpatrolentry): bool
{
return $user->checkPermissionTo('restore GuardPatrolEntry');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any GuardPatrolEntry');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, GuardPatrolEntry $guardpatrolentry): bool
{
return $user->checkPermissionTo('replicate GuardPatrolEntry');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder GuardPatrolEntry');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, GuardPatrolEntry $guardpatrolentry): bool
{
return $user->checkPermissionTo('force-delete GuardPatrolEntry');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any GuardPatrolEntry');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\InvoiceDataValidation;
use App\Models\User;
class InvoiceDataValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any InvoiceDataValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, InvoiceDataValidation $invoicedatavalidation): bool
{
return $user->checkPermissionTo('view InvoiceDataValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create InvoiceDataValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, InvoiceDataValidation $invoicedatavalidation): bool
{
return $user->checkPermissionTo('update InvoiceDataValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, InvoiceDataValidation $invoicedatavalidation): bool
{
return $user->checkPermissionTo('delete InvoiceDataValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any InvoiceDataValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, InvoiceDataValidation $invoicedatavalidation): bool
{
return $user->checkPermissionTo('restore InvoiceDataValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any InvoiceDataValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, InvoiceDataValidation $invoicedatavalidation): bool
{
return $user->checkPermissionTo('replicate InvoiceDataValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder InvoiceDataValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, InvoiceDataValidation $invoicedatavalidation): bool
{
return $user->checkPermissionTo('force-delete InvoiceDataValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any InvoiceDataValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\InvoiceOutValidation;
use App\Models\User;
class InvoiceOutValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any InvoiceOutValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, InvoiceOutValidation $invoiceoutvalidation): bool
{
return $user->checkPermissionTo('view InvoiceOutValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create InvoiceOutValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, InvoiceOutValidation $invoiceoutvalidation): bool
{
return $user->checkPermissionTo('update InvoiceOutValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, InvoiceOutValidation $invoiceoutvalidation): bool
{
return $user->checkPermissionTo('delete InvoiceOutValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any InvoiceOutValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, InvoiceOutValidation $invoiceoutvalidation): bool
{
return $user->checkPermissionTo('restore InvoiceOutValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any InvoiceOutValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, InvoiceOutValidation $invoiceoutvalidation): bool
{
return $user->checkPermissionTo('replicate InvoiceOutValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder InvoiceOutValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, InvoiceOutValidation $invoiceoutvalidation): bool
{
return $user->checkPermissionTo('force-delete InvoiceOutValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any InvoiceOutValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\InvoiceValidation;
use App\Models\User;
class InvoiceValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any InvoiceValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, InvoiceValidation $invoicevalidation): bool
{
return $user->checkPermissionTo('view InvoiceValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create InvoiceValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, InvoiceValidation $invoicevalidation): bool
{
return $user->checkPermissionTo('update InvoiceValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, InvoiceValidation $invoicevalidation): bool
{
return $user->checkPermissionTo('delete InvoiceValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any InvoiceValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, InvoiceValidation $invoicevalidation): bool
{
return $user->checkPermissionTo('restore InvoiceValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any InvoiceValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, InvoiceValidation $invoicevalidation): bool
{
return $user->checkPermissionTo('replicate InvoiceValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder InvoiceValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, InvoiceValidation $invoicevalidation): bool
{
return $user->checkPermissionTo('force-delete InvoiceValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any InvoiceValidation');
}
}

106
app/Policies/ItemPolicy.php Normal file
View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Item;
use App\Models\User;
class ItemPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Item');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Item $item): bool
{
return $user->checkPermissionTo('view Item');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Item');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Item $item): bool
{
return $user->checkPermissionTo('update Item');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Item $item): bool
{
return $user->checkPermissionTo('delete Item');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Item');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Item $item): bool
{
return $user->checkPermissionTo('restore Item');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Item');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Item $item): bool
{
return $user->checkPermissionTo('replicate Item');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Item');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Item $item): bool
{
return $user->checkPermissionTo('force-delete Item');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Item');
}
}

106
app/Policies/LinePolicy.php Normal file
View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Line;
use App\Models\User;
class LinePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Line');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Line $line): bool
{
return $user->checkPermissionTo('view Line');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Line');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Line $line): bool
{
return $user->checkPermissionTo('update Line');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Line $line): bool
{
return $user->checkPermissionTo('delete Line');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Line');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Line $line): bool
{
return $user->checkPermissionTo('restore Line');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Line');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Line $line): bool
{
return $user->checkPermissionTo('replicate Line');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Line');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Line $line): bool
{
return $user->checkPermissionTo('force-delete Line');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Line');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\LineStop;
use App\Models\User;
class LineStopPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any LineStop');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, LineStop $linestop): bool
{
return $user->checkPermissionTo('view LineStop');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create LineStop');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, LineStop $linestop): bool
{
return $user->checkPermissionTo('update LineStop');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, LineStop $linestop): bool
{
return $user->checkPermissionTo('delete LineStop');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any LineStop');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, LineStop $linestop): bool
{
return $user->checkPermissionTo('restore LineStop');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any LineStop');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, LineStop $linestop): bool
{
return $user->checkPermissionTo('replicate LineStop');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder LineStop');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, LineStop $linestop): bool
{
return $user->checkPermissionTo('force-delete LineStop');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any LineStop');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\LocatorInvoiceValidation;
use App\Models\User;
class LocatorInvoiceValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any LocatorInvoiceValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, LocatorInvoiceValidation $locatorinvoicevalidation): bool
{
return $user->checkPermissionTo('view LocatorInvoiceValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create LocatorInvoiceValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, LocatorInvoiceValidation $locatorinvoicevalidation): bool
{
return $user->checkPermissionTo('update LocatorInvoiceValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, LocatorInvoiceValidation $locatorinvoicevalidation): bool
{
return $user->checkPermissionTo('delete LocatorInvoiceValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any LocatorInvoiceValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, LocatorInvoiceValidation $locatorinvoicevalidation): bool
{
return $user->checkPermissionTo('restore LocatorInvoiceValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any LocatorInvoiceValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, LocatorInvoiceValidation $locatorinvoicevalidation): bool
{
return $user->checkPermissionTo('replicate LocatorInvoiceValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder LocatorInvoiceValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, LocatorInvoiceValidation $locatorinvoicevalidation): bool
{
return $user->checkPermissionTo('force-delete LocatorInvoiceValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any LocatorInvoiceValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Locator;
use App\Models\User;
class LocatorPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Locator');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Locator $locator): bool
{
return $user->checkPermissionTo('view Locator');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Locator');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Locator $locator): bool
{
return $user->checkPermissionTo('update Locator');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Locator $locator): bool
{
return $user->checkPermissionTo('delete Locator');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Locator');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Locator $locator): bool
{
return $user->checkPermissionTo('restore Locator');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Locator');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Locator $locator): bool
{
return $user->checkPermissionTo('replicate Locator');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Locator');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Locator $locator): bool
{
return $user->checkPermissionTo('force-delete Locator');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Locator');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Machine;
use App\Models\User;
class MachinePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Machine');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Machine $machine): bool
{
return $user->checkPermissionTo('view Machine');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Machine');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Machine $machine): bool
{
return $user->checkPermissionTo('update Machine');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Machine $machine): bool
{
return $user->checkPermissionTo('delete Machine');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Machine');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Machine $machine): bool
{
return $user->checkPermissionTo('restore Machine');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Machine');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Machine $machine): bool
{
return $user->checkPermissionTo('replicate Machine');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Machine');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Machine $machine): bool
{
return $user->checkPermissionTo('force-delete Machine');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Machine');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\MfmMeter;
use App\Models\User;
class MfmMeterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any MfmMeter');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, MfmMeter $mfmmeter): bool
{
return $user->checkPermissionTo('view MfmMeter');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create MfmMeter');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, MfmMeter $mfmmeter): bool
{
return $user->checkPermissionTo('update MfmMeter');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, MfmMeter $mfmmeter): bool
{
return $user->checkPermissionTo('delete MfmMeter');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any MfmMeter');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, MfmMeter $mfmmeter): bool
{
return $user->checkPermissionTo('restore MfmMeter');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any MfmMeter');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, MfmMeter $mfmmeter): bool
{
return $user->checkPermissionTo('replicate MfmMeter');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder MfmMeter');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, MfmMeter $mfmmeter): bool
{
return $user->checkPermissionTo('force-delete MfmMeter');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any MfmMeter');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\MfmParameter;
use App\Models\User;
class MfmParameterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any MfmParameter');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, MfmParameter $mfmparameter): bool
{
return $user->checkPermissionTo('view MfmParameter');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create MfmParameter');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, MfmParameter $mfmparameter): bool
{
return $user->checkPermissionTo('update MfmParameter');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, MfmParameter $mfmparameter): bool
{
return $user->checkPermissionTo('delete MfmParameter');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any MfmParameter');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, MfmParameter $mfmparameter): bool
{
return $user->checkPermissionTo('restore MfmParameter');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any MfmParameter');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, MfmParameter $mfmparameter): bool
{
return $user->checkPermissionTo('replicate MfmParameter');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder MfmParameter');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, MfmParameter $mfmparameter): bool
{
return $user->checkPermissionTo('force-delete MfmParameter');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any MfmParameter');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\MfmReading;
use App\Models\User;
class MfmReadingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any MfmReading');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, MfmReading $mfmreading): bool
{
return $user->checkPermissionTo('view MfmReading');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create MfmReading');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, MfmReading $mfmreading): bool
{
return $user->checkPermissionTo('update MfmReading');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, MfmReading $mfmreading): bool
{
return $user->checkPermissionTo('delete MfmReading');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any MfmReading');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, MfmReading $mfmreading): bool
{
return $user->checkPermissionTo('restore MfmReading');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any MfmReading');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, MfmReading $mfmreading): bool
{
return $user->checkPermissionTo('replicate MfmReading');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder MfmReading');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, MfmReading $mfmreading): bool
{
return $user->checkPermissionTo('force-delete MfmReading');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any MfmReading');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ModuleList;
use App\Models\User;
class ModuleListPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ModuleList');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ModuleList $modulelist): bool
{
return $user->checkPermissionTo('view ModuleList');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ModuleList');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ModuleList $modulelist): bool
{
return $user->checkPermissionTo('update ModuleList');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ModuleList $modulelist): bool
{
return $user->checkPermissionTo('delete ModuleList');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ModuleList');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ModuleList $modulelist): bool
{
return $user->checkPermissionTo('restore ModuleList');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ModuleList');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ModuleList $modulelist): bool
{
return $user->checkPermissionTo('replicate ModuleList');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ModuleList');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ModuleList $modulelist): bool
{
return $user->checkPermissionTo('force-delete ModuleList');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ModuleList');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\MotorTestingMaster;
use App\Models\User;
class MotorTestingMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any MotorTestingMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, MotorTestingMaster $motortestingmaster): bool
{
return $user->checkPermissionTo('view MotorTestingMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create MotorTestingMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, MotorTestingMaster $motortestingmaster): bool
{
return $user->checkPermissionTo('update MotorTestingMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, MotorTestingMaster $motortestingmaster): bool
{
return $user->checkPermissionTo('delete MotorTestingMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any MotorTestingMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, MotorTestingMaster $motortestingmaster): bool
{
return $user->checkPermissionTo('restore MotorTestingMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any MotorTestingMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, MotorTestingMaster $motortestingmaster): bool
{
return $user->checkPermissionTo('replicate MotorTestingMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder MotorTestingMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, MotorTestingMaster $motortestingmaster): bool
{
return $user->checkPermissionTo('force-delete MotorTestingMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any MotorTestingMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\OcrValidation;
use App\Models\User;
class OcrValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any OcrValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, OcrValidation $ocrvalidation): bool
{
return $user->checkPermissionTo('view OcrValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create OcrValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, OcrValidation $ocrvalidation): bool
{
return $user->checkPermissionTo('update OcrValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, OcrValidation $ocrvalidation): bool
{
return $user->checkPermissionTo('delete OcrValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any OcrValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, OcrValidation $ocrvalidation): bool
{
return $user->checkPermissionTo('restore OcrValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any OcrValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, OcrValidation $ocrvalidation): bool
{
return $user->checkPermissionTo('replicate OcrValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder OcrValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, OcrValidation $ocrvalidation): bool
{
return $user->checkPermissionTo('force-delete OcrValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any OcrValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\PalletValidation;
use App\Models\User;
class PalletValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any PalletValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, PalletValidation $palletvalidation): bool
{
return $user->checkPermissionTo('view PalletValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create PalletValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, PalletValidation $palletvalidation): bool
{
return $user->checkPermissionTo('update PalletValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, PalletValidation $palletvalidation): bool
{
return $user->checkPermissionTo('delete PalletValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any PalletValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, PalletValidation $palletvalidation): bool
{
return $user->checkPermissionTo('restore PalletValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any PalletValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, PalletValidation $palletvalidation): bool
{
return $user->checkPermissionTo('replicate PalletValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder PalletValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, PalletValidation $palletvalidation): bool
{
return $user->checkPermissionTo('force-delete PalletValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any PalletValidation');
}
}

View File

@@ -0,0 +1,80 @@
<?php
namespace App\Policies;
use Spatie\Permission\Models\Permission;
// use App\Models\SpatiePermissionModelsPermission;
use App\Models\User;
use Illuminate\Auth\Access\Response;
class PermissionPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
// return false;
return $user->hasPermissionTo('view permissions');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Permission $permission): bool
// public function view(User $user, SpatiePermissionModelsPermission $spatiePermissionModelsPermission): bool
{
return $user->hasPermissionTo('view permissions');
// return false;
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->hasPermissionTo('create permissions');
// return false;
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Permission $permission): bool
// public function update(User $user, SpatiePermissionModelsPermission $spatiePermissionModelsPermission): bool
{
return $user->hasPermissionTo('edit permissions');
// return false;
}
/**
* Determine whether the user can delete the model.
*/
//public function delete(User $user, Permission $permission): bool
public function delete(User $user, Permission $permission): bool
// public function delete(User $user, SpatiePermissionModelsPermission $spatiePermissionModelsPermission): bool
{
return $user->hasPermissionTo('delete permissions');
// return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Permission $permission): bool
// public function restore(User $user, SpatiePermissionModelsPermission $spatiePermissionModelsPermission): bool
{
return $user->hasPermissionTo('restore permissions');
// return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Permission $permission): bool
// public function forceDelete(User $user, SpatiePermissionModelsPermission $spatiePermissionModelsPermission): bool
{
return $user->hasPermissionTo('force-delete permissions');
// return false;
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Plant;
use App\Models\User;
class PlantPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Plant');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Plant $plant): bool
{
return $user->checkPermissionTo('view Plant');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Plant');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Plant $plant): bool
{
return $user->checkPermissionTo('update Plant');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Plant $plant): bool
{
return $user->checkPermissionTo('delete Plant');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Plant');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Plant $plant): bool
{
return $user->checkPermissionTo('restore Plant');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Plant');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Plant $plant): bool
{
return $user->checkPermissionTo('replicate Plant');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Plant');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Plant $plant): bool
{
return $user->checkPermissionTo('force-delete Plant');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Plant');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ProcessOrder;
use App\Models\User;
class ProcessOrderPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ProcessOrder');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ProcessOrder $processorder): bool
{
return $user->checkPermissionTo('view ProcessOrder');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ProcessOrder');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ProcessOrder $processorder): bool
{
return $user->checkPermissionTo('update ProcessOrder');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ProcessOrder $processorder): bool
{
return $user->checkPermissionTo('delete ProcessOrder');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ProcessOrder');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ProcessOrder $processorder): bool
{
return $user->checkPermissionTo('restore ProcessOrder');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ProcessOrder');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ProcessOrder $processorder): bool
{
return $user->checkPermissionTo('replicate ProcessOrder');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ProcessOrder');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ProcessOrder $processorder): bool
{
return $user->checkPermissionTo('force-delete ProcessOrder');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ProcessOrder');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ProductCharacteristicsMaster;
use App\Models\User;
class ProductCharacteristicsMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ProductCharacteristicsMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ProductCharacteristicsMaster $productcharacteristicsmaster): bool
{
return $user->checkPermissionTo('view ProductCharacteristicsMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ProductCharacteristicsMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ProductCharacteristicsMaster $productcharacteristicsmaster): bool
{
return $user->checkPermissionTo('update ProductCharacteristicsMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ProductCharacteristicsMaster $productcharacteristicsmaster): bool
{
return $user->checkPermissionTo('delete ProductCharacteristicsMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ProductCharacteristicsMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ProductCharacteristicsMaster $productcharacteristicsmaster): bool
{
return $user->checkPermissionTo('restore ProductCharacteristicsMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ProductCharacteristicsMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ProductCharacteristicsMaster $productcharacteristicsmaster): bool
{
return $user->checkPermissionTo('replicate ProductCharacteristicsMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ProductCharacteristicsMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ProductCharacteristicsMaster $productcharacteristicsmaster): bool
{
return $user->checkPermissionTo('force-delete ProductCharacteristicsMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ProductCharacteristicsMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ProductionLineStop;
use App\Models\User;
class ProductionLineStopPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ProductionLineStop');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ProductionLineStop $productionlinestop): bool
{
return $user->checkPermissionTo('view ProductionLineStop');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ProductionLineStop');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ProductionLineStop $productionlinestop): bool
{
return $user->checkPermissionTo('update ProductionLineStop');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ProductionLineStop $productionlinestop): bool
{
return $user->checkPermissionTo('delete ProductionLineStop');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ProductionLineStop');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ProductionLineStop $productionlinestop): bool
{
return $user->checkPermissionTo('restore ProductionLineStop');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ProductionLineStop');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ProductionLineStop $productionlinestop): bool
{
return $user->checkPermissionTo('replicate ProductionLineStop');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ProductionLineStop');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ProductionLineStop $productionlinestop): bool
{
return $user->checkPermissionTo('force-delete ProductionLineStop');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ProductionLineStop');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ProductionPlan;
use App\Models\User;
class ProductionPlanPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ProductionPlan');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ProductionPlan $productionplan): bool
{
return $user->checkPermissionTo('view ProductionPlan');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ProductionPlan');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ProductionPlan $productionplan): bool
{
return $user->checkPermissionTo('update ProductionPlan');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ProductionPlan $productionplan): bool
{
return $user->checkPermissionTo('delete ProductionPlan');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ProductionPlan');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ProductionPlan $productionplan): bool
{
return $user->checkPermissionTo('restore ProductionPlan');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ProductionPlan');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ProductionPlan $productionplan): bool
{
return $user->checkPermissionTo('replicate ProductionPlan');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ProductionPlan');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ProductionPlan $productionplan): bool
{
return $user->checkPermissionTo('force-delete ProductionPlan');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ProductionPlan');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ProductionQuantity;
use App\Models\User;
class ProductionQuantityPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ProductionQuantity');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ProductionQuantity $productionquantity): bool
{
return $user->checkPermissionTo('view ProductionQuantity');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ProductionQuantity');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ProductionQuantity $productionquantity): bool
{
return $user->checkPermissionTo('update ProductionQuantity');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ProductionQuantity $productionquantity): bool
{
return $user->checkPermissionTo('delete ProductionQuantity');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ProductionQuantity');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ProductionQuantity $productionquantity): bool
{
return $user->checkPermissionTo('restore ProductionQuantity');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ProductionQuantity');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ProductionQuantity $productionquantity): bool
{
return $user->checkPermissionTo('replicate ProductionQuantity');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ProductionQuantity');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ProductionQuantity $productionquantity): bool
{
return $user->checkPermissionTo('force-delete ProductionQuantity');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ProductionQuantity');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\QualityValidation;
use App\Models\User;
class QualityValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any QualityValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, QualityValidation $qualityvalidation): bool
{
return $user->checkPermissionTo('view QualityValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create QualityValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, QualityValidation $qualityvalidation): bool
{
return $user->checkPermissionTo('update QualityValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, QualityValidation $qualityvalidation): bool
{
return $user->checkPermissionTo('delete QualityValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any QualityValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, QualityValidation $qualityvalidation): bool
{
return $user->checkPermissionTo('restore QualityValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any QualityValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, QualityValidation $qualityvalidation): bool
{
return $user->checkPermissionTo('replicate QualityValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder QualityValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, QualityValidation $qualityvalidation): bool
{
return $user->checkPermissionTo('force-delete QualityValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any QualityValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\RejectReason;
use App\Models\User;
class RejectReasonPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any RejectReason');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, RejectReason $rejectreason): bool
{
return $user->checkPermissionTo('view RejectReason');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create RejectReason');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, RejectReason $rejectreason): bool
{
return $user->checkPermissionTo('update RejectReason');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, RejectReason $rejectreason): bool
{
return $user->checkPermissionTo('delete RejectReason');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any RejectReason');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, RejectReason $rejectreason): bool
{
return $user->checkPermissionTo('restore RejectReason');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any RejectReason');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, RejectReason $rejectreason): bool
{
return $user->checkPermissionTo('replicate RejectReason');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder RejectReason');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, RejectReason $rejectreason): bool
{
return $user->checkPermissionTo('force-delete RejectReason');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any RejectReason');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\ReworkLocatorInvoiceValidation;
use App\Models\User;
class ReworkLocatorInvoiceValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, ReworkLocatorInvoiceValidation $reworklocatorinvoicevalidation): bool
{
return $user->checkPermissionTo('view ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, ReworkLocatorInvoiceValidation $reworklocatorinvoicevalidation): bool
{
return $user->checkPermissionTo('update ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, ReworkLocatorInvoiceValidation $reworklocatorinvoicevalidation): bool
{
return $user->checkPermissionTo('delete ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, ReworkLocatorInvoiceValidation $reworklocatorinvoicevalidation): bool
{
return $user->checkPermissionTo('restore ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, ReworkLocatorInvoiceValidation $reworklocatorinvoicevalidation): bool
{
return $user->checkPermissionTo('replicate ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, ReworkLocatorInvoiceValidation $reworklocatorinvoicevalidation): bool
{
return $user->checkPermissionTo('force-delete ReworkLocatorInvoiceValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any ReworkLocatorInvoiceValidation');
}
}

View File

@@ -0,0 +1,79 @@
<?php
namespace App\Policies;
// use App\Models\SpatiePermissionModelsRole;
use App\Models\User;
use Spatie\Permission\Models\Role;
use Illuminate\Auth\Access\Response;
class RolePolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->hasPermissionTo('view roles');
// return false;
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Role $role): bool // Changed typehint
// public function view(User $user, SpatiePermissionModelsRole $spatiePermissionModelsRole): bool
{
return $user->hasPermissionTo('view roles');
// return false;
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->hasPermissionTo('create roles');
// return false;
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Role $role): bool // Changed typehint
// public function update(User $user, SpatiePermissionModelsRole $spatiePermissionModelsRole): bool
{
return $user->hasPermissionTo('edit roles');
// return false;
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Role $role): bool // Changed typehint
// public function delete(User $user, SpatiePermissionModelsRole $spatiePermissionModelsRole): bool
{
return $user->hasPermissionTo('delete roles');
// return false;
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Role $role): bool // Changed typehint
// public function restore(User $user, SpatiePermissionModelsRole $spatiePermissionModelsRole): bool
{
return $user->hasPermissionTo('restore roles');
// return false;
}
/**
* Determine whether the user can permanently delete the model.
*/
// public function forceDelete(User $user, SpatiePermissionModelsRole $spatiePermissionModelsRole): bool
public function forceDelete(User $user, Role $role): bool // Changed typehint
{
return $user->hasPermissionTo('force-delete roles');
// return false;
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\SerialValidation;
use App\Models\User;
class SerialValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any SerialValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, SerialValidation $serialvalidation): bool
{
return $user->checkPermissionTo('view SerialValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create SerialValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, SerialValidation $serialvalidation): bool
{
return $user->checkPermissionTo('update SerialValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, SerialValidation $serialvalidation): bool
{
return $user->checkPermissionTo('delete SerialValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any SerialValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, SerialValidation $serialvalidation): bool
{
return $user->checkPermissionTo('restore SerialValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any SerialValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, SerialValidation $serialvalidation): bool
{
return $user->checkPermissionTo('replicate SerialValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder SerialValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, SerialValidation $serialvalidation): bool
{
return $user->checkPermissionTo('force-delete SerialValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any SerialValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\Shift;
use App\Models\User;
class ShiftPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any Shift');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, Shift $shift): bool
{
return $user->checkPermissionTo('view Shift');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create Shift');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, Shift $shift): bool
{
return $user->checkPermissionTo('update Shift');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, Shift $shift): bool
{
return $user->checkPermissionTo('delete Shift');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any Shift');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, Shift $shift): bool
{
return $user->checkPermissionTo('restore Shift');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any Shift');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, Shift $shift): bool
{
return $user->checkPermissionTo('replicate Shift');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder Shift');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, Shift $shift): bool
{
return $user->checkPermissionTo('force-delete Shift');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any Shift');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\StickerMappingMaster;
use App\Models\User;
class StickerMappingMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any StickerMappingMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, StickerMappingMaster $stickermappingmaster): bool
{
return $user->checkPermissionTo('view StickerMappingMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create StickerMappingMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, StickerMappingMaster $stickermappingmaster): bool
{
return $user->checkPermissionTo('update StickerMappingMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, StickerMappingMaster $stickermappingmaster): bool
{
return $user->checkPermissionTo('delete StickerMappingMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any StickerMappingMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, StickerMappingMaster $stickermappingmaster): bool
{
return $user->checkPermissionTo('restore StickerMappingMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any StickerMappingMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, StickerMappingMaster $stickermappingmaster): bool
{
return $user->checkPermissionTo('replicate StickerMappingMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder StickerMappingMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, StickerMappingMaster $stickermappingmaster): bool
{
return $user->checkPermissionTo('force-delete StickerMappingMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any StickerMappingMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\StickerMaster;
use App\Models\User;
class StickerMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any StickerMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, StickerMaster $stickermaster): bool
{
return $user->checkPermissionTo('view StickerMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create StickerMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, StickerMaster $stickermaster): bool
{
return $user->checkPermissionTo('update StickerMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, StickerMaster $stickermaster): bool
{
return $user->checkPermissionTo('delete StickerMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any StickerMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, StickerMaster $stickermaster): bool
{
return $user->checkPermissionTo('restore StickerMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any StickerMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, StickerMaster $stickermaster): bool
{
return $user->checkPermissionTo('replicate StickerMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder StickerMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, StickerMaster $stickermaster): bool
{
return $user->checkPermissionTo('force-delete StickerMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any StickerMaster');
}
}

View File

@@ -0,0 +1,107 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\StickerPrinting;
use App\Models\User;
class StickerPrintingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any StickerPrinting');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, StickerPrinting $stickerprinting): bool
{
return $user->checkPermissionTo('view StickerPrinting');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create StickerPrinting');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, StickerPrinting $stickerprinting): bool
{
return $user->checkPermissionTo('update StickerPrinting');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, StickerPrinting $stickerprinting): bool
{
return $user->checkPermissionTo('delete StickerPrinting');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any StickerPrinting');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, StickerPrinting $stickerprinting): bool
{
return $user->checkPermissionTo('restore StickerPrinting');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any StickerPrinting');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, StickerPrinting $stickerprinting): bool
{
return $user->checkPermissionTo('replicate StickerPrinting');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder StickerPrinting');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, StickerPrinting $stickerprinting): bool
{
return $user->checkPermissionTo('force-delete StickerPrinting');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any StickerPrinting');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\TempLiveReading;
use App\Models\User;
class TempLiveReadingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any TempLiveReading');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, TempLiveReading $templivereading): bool
{
return $user->checkPermissionTo('view TempLiveReading');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create TempLiveReading');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, TempLiveReading $templivereading): bool
{
return $user->checkPermissionTo('update TempLiveReading');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, TempLiveReading $templivereading): bool
{
return $user->checkPermissionTo('delete TempLiveReading');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any TempLiveReading');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, TempLiveReading $templivereading): bool
{
return $user->checkPermissionTo('restore TempLiveReading');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any TempLiveReading');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, TempLiveReading $templivereading): bool
{
return $user->checkPermissionTo('replicate TempLiveReading');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder TempLiveReading');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, TempLiveReading $templivereading): bool
{
return $user->checkPermissionTo('force-delete TempLiveReading');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any TempLiveReading');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\TestingPanelReading;
use App\Models\User;
class TestingPanelReadingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any TestingPanelReading');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, TestingPanelReading $testingpanelreading): bool
{
return $user->checkPermissionTo('view TestingPanelReading');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create TestingPanelReading');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, TestingPanelReading $testingpanelreading): bool
{
return $user->checkPermissionTo('update TestingPanelReading');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, TestingPanelReading $testingpanelreading): bool
{
return $user->checkPermissionTo('delete TestingPanelReading');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any TestingPanelReading');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, TestingPanelReading $testingpanelreading): bool
{
return $user->checkPermissionTo('restore TestingPanelReading');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any TestingPanelReading');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, TestingPanelReading $testingpanelreading): bool
{
return $user->checkPermissionTo('replicate TestingPanelReading');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder TestingPanelReading');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, TestingPanelReading $testingpanelreading): bool
{
return $user->checkPermissionTo('force-delete TestingPanelReading');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any TestingPanelReading');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\TrackingDeviceMaster;
use App\Models\User;
class TrackingDeviceMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any TrackingDeviceMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, TrackingDeviceMaster $trackingdevicemaster): bool
{
return $user->checkPermissionTo('view TrackingDeviceMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create TrackingDeviceMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, TrackingDeviceMaster $trackingdevicemaster): bool
{
return $user->checkPermissionTo('update TrackingDeviceMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, TrackingDeviceMaster $trackingdevicemaster): bool
{
return $user->checkPermissionTo('delete TrackingDeviceMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any TrackingDeviceMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, TrackingDeviceMaster $trackingdevicemaster): bool
{
return $user->checkPermissionTo('restore TrackingDeviceMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any TrackingDeviceMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, TrackingDeviceMaster $trackingdevicemaster): bool
{
return $user->checkPermissionTo('replicate TrackingDeviceMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder TrackingDeviceMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, TrackingDeviceMaster $trackingdevicemaster): bool
{
return $user->checkPermissionTo('force-delete TrackingDeviceMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any TrackingDeviceMaster');
}
}

106
app/Policies/UserPolicy.php Normal file
View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\User;
class UserPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any User');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, User $model): bool
{
return $user->checkPermissionTo('view User');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create User');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, User $model): bool
{
return $user->checkPermissionTo('update User');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, User $model): bool
{
return $user->checkPermissionTo('delete User');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any User');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, User $model): bool
{
return $user->checkPermissionTo('restore User');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any User');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, User $model): bool
{
return $user->checkPermissionTo('replicate User');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder User');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, User $model): bool
{
return $user->checkPermissionTo('force-delete User');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any User');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\VehicleMaster;
use App\Models\User;
class VehicleMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any VehicleMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, VehicleMaster $vehiclemaster): bool
{
return $user->checkPermissionTo('view VehicleMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create VehicleMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, VehicleMaster $vehiclemaster): bool
{
return $user->checkPermissionTo('update VehicleMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, VehicleMaster $vehiclemaster): bool
{
return $user->checkPermissionTo('delete VehicleMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any VehicleMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, VehicleMaster $vehiclemaster): bool
{
return $user->checkPermissionTo('restore VehicleMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any VehicleMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, VehicleMaster $vehiclemaster): bool
{
return $user->checkPermissionTo('replicate VehicleMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder VehicleMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, VehicleMaster $vehiclemaster): bool
{
return $user->checkPermissionTo('force-delete VehicleMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any VehicleMaster');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\VehicleTracking;
use App\Models\User;
class VehicleTrackingPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any VehicleTracking');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, VehicleTracking $vehicletracking): bool
{
return $user->checkPermissionTo('view VehicleTracking');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create VehicleTracking');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, VehicleTracking $vehicletracking): bool
{
return $user->checkPermissionTo('update VehicleTracking');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, VehicleTracking $vehicletracking): bool
{
return $user->checkPermissionTo('delete VehicleTracking');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any VehicleTracking');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, VehicleTracking $vehicletracking): bool
{
return $user->checkPermissionTo('restore VehicleTracking');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any VehicleTracking');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, VehicleTracking $vehicletracking): bool
{
return $user->checkPermissionTo('replicate VehicleTracking');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder VehicleTracking');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, VehicleTracking $vehicletracking): bool
{
return $user->checkPermissionTo('force-delete VehicleTracking');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any VehicleTracking');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\WeightValidation;
use App\Models\User;
class WeightValidationPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any WeightValidation');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, WeightValidation $weightvalidation): bool
{
return $user->checkPermissionTo('view WeightValidation');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create WeightValidation');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, WeightValidation $weightvalidation): bool
{
return $user->checkPermissionTo('update WeightValidation');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, WeightValidation $weightvalidation): bool
{
return $user->checkPermissionTo('delete WeightValidation');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any WeightValidation');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, WeightValidation $weightvalidation): bool
{
return $user->checkPermissionTo('restore WeightValidation');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any WeightValidation');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, WeightValidation $weightvalidation): bool
{
return $user->checkPermissionTo('replicate WeightValidation');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder WeightValidation');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, WeightValidation $weightvalidation): bool
{
return $user->checkPermissionTo('force-delete WeightValidation');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any WeightValidation');
}
}

View File

@@ -0,0 +1,106 @@
<?php
namespace App\Policies;
use Illuminate\Auth\Access\Response;
use App\Models\WorkGroupMaster;
use App\Models\User;
class WorkGroupMasterPolicy
{
/**
* Determine whether the user can view any models.
*/
public function viewAny(User $user): bool
{
return $user->checkPermissionTo('view-any WorkGroupMaster');
}
/**
* Determine whether the user can view the model.
*/
public function view(User $user, WorkGroupMaster $workgroupmaster): bool
{
return $user->checkPermissionTo('view WorkGroupMaster');
}
/**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return $user->checkPermissionTo('create WorkGroupMaster');
}
/**
* Determine whether the user can update the model.
*/
public function update(User $user, WorkGroupMaster $workgroupmaster): bool
{
return $user->checkPermissionTo('update WorkGroupMaster');
}
/**
* Determine whether the user can delete the model.
*/
public function delete(User $user, WorkGroupMaster $workgroupmaster): bool
{
return $user->checkPermissionTo('delete WorkGroupMaster');
}
/**
* Determine whether the user can delete any models.
*/
public function deleteAny(User $user): bool
{
return $user->checkPermissionTo('delete-any WorkGroupMaster');
}
/**
* Determine whether the user can restore the model.
*/
public function restore(User $user, WorkGroupMaster $workgroupmaster): bool
{
return $user->checkPermissionTo('restore WorkGroupMaster');
}
/**
* Determine whether the user can restore any models.
*/
public function restoreAny(User $user): bool
{
return $user->checkPermissionTo('restore-any WorkGroupMaster');
}
/**
* Determine whether the user can replicate the model.
*/
public function replicate(User $user, WorkGroupMaster $workgroupmaster): bool
{
return $user->checkPermissionTo('replicate WorkGroupMaster');
}
/**
* Determine whether the user can reorder the models.
*/
public function reorder(User $user): bool
{
return $user->checkPermissionTo('reorder WorkGroupMaster');
}
/**
* Determine whether the user can permanently delete the model.
*/
public function forceDelete(User $user, WorkGroupMaster $workgroupmaster): bool
{
return $user->checkPermissionTo('force-delete WorkGroupMaster');
}
/**
* Determine whether the user can permanently delete any models.
*/
public function forceDeleteAny(User $user): bool
{
return $user->checkPermissionTo('force-delete-any WorkGroupMaster');
}
}