fix: [esign] OTP SMS 발송 조건을 tenant_id 대신 서명자 역할 기반으로 변경
- 기존: tenant_id != 1 조건으로 본사 테넌트 전체 SMS 차단 - 변경: signer->role === counterpart 조건으로 상대방만 SMS 수신 - 본사(creator)는 이메일 OTP 유지, 상대방(counterpart)은 SMS OTP 수신
This commit is contained in:
@@ -167,8 +167,8 @@ public function sendOtp(string $token): JsonResponse
|
||||
$sendMethod = $contract->send_method ?? 'email';
|
||||
$channel = 'email';
|
||||
|
||||
// 알림톡/both 방식이고 전화번호가 있으면 SMS로 발송 (본사 tenant_id=1은 이메일 유지)
|
||||
if (in_array($sendMethod, ['alimtalk', 'both']) && $signer->phone && $contract->tenant_id != 1) {
|
||||
// 알림톡/both 방식이고 전화번호가 있으면 SMS로 발송 (상대방만 SMS, 본사(creator)는 이메일 유지)
|
||||
if (in_array($sendMethod, ['alimtalk', 'both']) && $signer->phone && $signer->role === EsignSigner::ROLE_COUNTERPART) {
|
||||
$smsSent = $this->sendOtpViaSms($contract, $signer, $otpCode);
|
||||
if ($smsSent) {
|
||||
$channel = 'sms';
|
||||
|
||||
Reference in New Issue
Block a user