mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
25 lines
498 B
PHP
25 lines
498 B
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Models\User;
|
|
use App\Policies\CheckoutablePermissionsPolicy;
|
|
|
|
class AssetPolicy extends CheckoutablePermissionsPolicy
|
|
{
|
|
protected function columnName()
|
|
{
|
|
return 'assets';
|
|
}
|
|
|
|
public function viewRequestable(User $user, Asset $asset = null)
|
|
{
|
|
return $user->hasAccess('assets.view.requestable');
|
|
}
|
|
|
|
public function audit(User $user, Asset $asset = null)
|
|
{
|
|
return $user->hasAccess('assets.audit');
|
|
}
|
|
}
|