fix:영업파트너 삭제 권한 체크 추가 - 최고관리자만 삭제 가능

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-02 09:21:37 +09:00
parent 7efcca5f3d
commit 7b069d6197

View File

@@ -210,10 +210,15 @@ public function update(Request $request, int $id)
}
/**
* 삭제 처리 (비활성화)
* 삭제 처리 (비활성화) - 최고관리자만 가능
*/
public function destroy(int $id)
{
// 권한 체크: admin 역할만 삭제 가능
if (!auth()->user()->isAdmin()) {
abort(403, '삭제 권한이 없습니다.');
}
$partner = User::findOrFail($id);
$partner->update(['is_active' => false]);