updated permissions
This commit is contained in:
parent
8f47f40b03
commit
83f7073b18
31 changed files with 1467 additions and 901 deletions
25
app/Policies/MovieListPolicy.php
Normal file
25
app/Policies/MovieListPolicy.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\MovieList;
|
||||
use App\Models\User;
|
||||
|
||||
class MovieListPolicy
|
||||
{
|
||||
/**
|
||||
* Create a new policy instance.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function update(User $user, MovieList $movieList)
|
||||
{
|
||||
// If the user is the owner of the movie list or has been added as an editor for
|
||||
// the movie list, allow them to update it.
|
||||
|
||||
return $movieList->owner()->id = $user->id; //|| $movieList->editors->contains($user->id);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue