mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'tenant-improve' into 'tenant-improve'
Fix user verifying functionality in OTP See merge request entgra/carbon-device-mgt!617
This commit is contained in:
commit
435af6f7c8
@ -213,8 +213,8 @@ public class OTPManagementServiceImpl implements OTPManagementService {
|
||||
|
||||
String[] superTenantDetails = otpWrapper.getUsername().split("@");
|
||||
|
||||
if (MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(superTenantDetails[1]) || !superTenantDetails[0]
|
||||
.equals(kmConfig.getAdminUsername())) {
|
||||
if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(superTenantDetails[superTenantDetails.length - 1])
|
||||
|| !superTenantDetails[0].equals(kmConfig.getAdminUsername())) {
|
||||
String msg = "You don't have required permission to create OTP";
|
||||
log.error(msg);
|
||||
throw new UnAuthorizedException(msg);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user