fix:프로필 이름 수정 권한을 최고관리자로 제한

This commit is contained in:
김보곤
2026-02-03 14:01:49 +09:00
parent 35a205c48f
commit 86fa750217
3 changed files with 18 additions and 3 deletions

View File

@@ -21,8 +21,13 @@ public function authorize(): bool
*/
public function rules(): array
{
// 최고관리자만 이름 수정 가능
$nameRule = auth()->user()->isSuperAdmin()
? 'required|string|max:100'
: 'nullable';
return [
'name' => 'required|string|max:100',
'name' => $nameRule,
'phone' => 'nullable|string|max:20',
];
}