This commit is contained in:
Richard Dern
2022-01-12 00:35:37 +01:00
commit 400e3d01f1
1363 changed files with 57778 additions and 0 deletions

View File

@@ -0,0 +1,78 @@
<?php
namespace App\Models\Policies;
use App\Models\Document;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class DocumentPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can view any models.
*
* @return mixed
*/
public function viewAny(User $user)
{
}
/**
* Determine whether the user can view the model.
*
* @return mixed
*/
public function view(User $user, Document $document)
{
return true;
}
/**
* Determine whether the user can create models.
*
* @return mixed
*/
public function create(User $user)
{
// Authorization will be checked in target folder
return true;
}
/**
* Determine whether the user can update the model.
*
* @return mixed
*/
public function update(User $user, Document $document)
{
}
/**
* Determine whether the user can delete the model.
*
* @return mixed
*/
public function delete(User $user, Document $document)
{
}
/**
* Determine whether the user can restore the model.
*
* @return mixed
*/
public function restore(User $user, Document $document)
{
}
/**
* Determine whether the user can permanently delete the model.
*
* @return mixed
*/
public function forceDelete(User $user, Document $document)
{
}
}