mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
add global search hotkey add community stores where users can import/export stores from new repository fix media markt 404 on crawling add currency resource, so users can modify the rate without the need for API add new '*' in case there are multiple fields in schema add basic code for plugin support to test it in production, shouldn't affect anything add warning message if ntfy is added without topic
74 lines
1.4 KiB
PHP
74 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Policies;
|
|
|
|
use App\Enums\RoleEnum;
|
|
use App\Models\Currency;
|
|
use App\Models\User;
|
|
use Illuminate\Auth\Access\Response;
|
|
use Illuminate\Support\Facades\Auth;
|
|
|
|
class CurrencyPolicy
|
|
{
|
|
public function before()
|
|
{
|
|
return Auth::user()->role == RoleEnum::Admin;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can view any models.
|
|
*/
|
|
public function viewAny(User $user): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can view the model.
|
|
*/
|
|
public function view(User $user, Currency $currency): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can create models.
|
|
*/
|
|
public function create(User $user): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can update the model.
|
|
*/
|
|
public function update(User $user, Currency $currency): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can delete the model.
|
|
*/
|
|
public function delete(User $user, Currency $currency): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can restore the model.
|
|
*/
|
|
public function restore(User $user, Currency $currency): bool
|
|
{
|
|
return false;
|
|
}
|
|
|
|
/**
|
|
* Determine whether the user can permanently delete the model.
|
|
*/
|
|
public function forceDelete(User $user, Currency $currency): bool
|
|
{
|
|
return false;
|
|
}
|
|
}
|