mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 17:31:06 +03:30
update item & package & label & cycle
This commit is contained in:
@@ -8,21 +8,25 @@ use Doctrine\Tests\Common\Inflector\InflectorTest;
|
||||
|
||||
class LabelPolicy
|
||||
{
|
||||
public function showAll(User $User)
|
||||
{
|
||||
if($User->hasRole('Admin'))
|
||||
return true;
|
||||
}
|
||||
public function delete(User $User, Label $Label)
|
||||
{
|
||||
// if($User->hasRole('Admin') && $Label->users->count() == 0)
|
||||
if($User->hasRole('Admin') || $Label->user_id == $User->id)
|
||||
return true;
|
||||
}
|
||||
|
||||
public function update(User $User, Label $Label)
|
||||
{
|
||||
// if($User->hasRole('Admin'))
|
||||
if($User->hasRole('Admin') || $Label->user_id == $User->id)
|
||||
return true;
|
||||
}
|
||||
|
||||
public function store(User $User)
|
||||
{
|
||||
// if($User->hasRole('Admin'))
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user