wip
This commit is contained in:
@@ -13,7 +13,11 @@ class ProvincePolicy
|
||||
*/
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -21,7 +25,11 @@ class ProvincePolicy
|
||||
*/
|
||||
public function view(User $user, Province $province): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -29,7 +37,11 @@ class ProvincePolicy
|
||||
*/
|
||||
public function create(User $user): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,7 +49,11 @@ class ProvincePolicy
|
||||
*/
|
||||
public function update(User $user, Province $province): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,7 +61,11 @@ class ProvincePolicy
|
||||
*/
|
||||
public function delete(User $user, Province $province): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,7 +73,11 @@ class ProvincePolicy
|
||||
*/
|
||||
public function restore(User $user, Province $province): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,6 +85,10 @@ class ProvincePolicy
|
||||
*/
|
||||
public function forceDelete(User $user, Province $province): bool
|
||||
{
|
||||
//
|
||||
if ($user->isAdmin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user