mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Merge remote-tracking branch 'origin/master' into develop
Signed-off-by: snipe <snipe@snipe.net> # Conflicts: # config/permissions.php
This commit is contained in:
commit
ef1eb15a91
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers\Kits;
|
|||
use App\Http\Controllers\CheckInOutRequest;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\PredefinedKit;
|
||||
use App\Models\Asset;
|
||||
use App\Models\PredefinedLicence;
|
||||
use App\Models\PredefinedModel;
|
||||
use App\Models\User;
|
||||
|
|
|
@ -83,6 +83,18 @@ abstract class SnipePermissionsPolicy
|
|||
return $user->hasAccess($this->columnName().'.edit');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the accessory.
|
||||
*
|
||||
* @param \App\Models\User $user
|
||||
* @return mixed
|
||||
*/
|
||||
public function checkout(User $user, $item = null)
|
||||
{
|
||||
return $user->hasAccess($this->columnName().'.checkout');
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the accessory.
|
||||
*
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
|
||||
return [
|
||||
|
||||
'Global' => [
|
||||
|
@ -97,6 +98,7 @@ return [
|
|||
'display' => true,
|
||||
],
|
||||
|
||||
|
||||
[
|
||||
'permission' => 'assets.view.requestable',
|
||||
'label' => 'View Requestable Assets',
|
||||
|
@ -178,6 +180,7 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
|
||||
'Licenses' => [
|
||||
[
|
||||
'permission' => 'licenses.view',
|
||||
|
@ -223,6 +226,7 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
|
||||
'Components' => [
|
||||
[
|
||||
'permission' => 'components.view',
|
||||
|
@ -288,13 +292,6 @@ return [
|
|||
'note' => '',
|
||||
'display' => true,
|
||||
],
|
||||
|
||||
[
|
||||
'permission' => 'kits.checkout',
|
||||
'label' => 'Checkout ',
|
||||
'note' => '',
|
||||
'display' => true,
|
||||
],
|
||||
],
|
||||
|
||||
'Users' => [
|
||||
|
@ -488,6 +485,7 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
|
||||
'Manufacturers' => [
|
||||
[
|
||||
'permission' => 'manufacturers.view',
|
||||
|
@ -596,6 +594,9 @@ return [
|
|||
],
|
||||
],
|
||||
|
||||
|
||||
|
||||
|
||||
'Self' => [
|
||||
[
|
||||
'permission' => 'self.two_factor',
|
||||
|
|
Loading…
Reference in a new issue