feat(admin): 密码校验统一与后台 API/设置增强
- 管理端账号/代理/站点等密码最短长度统一为 6 位 - LotterySettings、审计日志展示、币种与报表接口等小修复 - 补充设置批量更新、注单、校验错误等相关测试
This commit is contained in:
@@ -17,6 +17,10 @@ final class AdminSettingPolicy
|
||||
|
||||
public static function canUpdate(AdminUser $admin, string $key): bool
|
||||
{
|
||||
if (LotterySettings::isEnvLocked($key)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (str_starts_with($key, 'settlement.')) {
|
||||
return $admin->hasAdminPermission('prd.payout.manage');
|
||||
}
|
||||
@@ -46,6 +50,12 @@ final class AdminSettingPolicy
|
||||
$values = [];
|
||||
foreach ($items as $index => $item) {
|
||||
$key = (string) $item['key'];
|
||||
if (LotterySettings::isEnvLocked($key)) {
|
||||
throw ValidationException::withMessages([
|
||||
"items.$index.key" => ['该参数由服务器环境变量配置,不能在后台修改。'],
|
||||
]);
|
||||
}
|
||||
|
||||
if (! in_array($key, self::WALLET_LIMIT_KEYS, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user