Files
Cybrarist c5095d1f9b start building dashboard with widgets
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
2026-01-27 21:38:58 +04:00

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;
}
}