fix:프로필 이름 수정 권한을 최고관리자로 제한
This commit is contained in:
@@ -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',
|
||||
];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user