mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-20 04:24:23 -08:00
ca50ea190f
Wrong branch :(
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');
|
|
}
|
|
}
|