Revision 54:e77e0b169b52
src/main/java/my/com/upass/MinimalUPassControllerV2.java | ||
---|---|---|
378 | 378 |
final Object appIdObj = AppAccessMgtService.profileToAppMap.get(profile.getClass()); |
379 | 379 |
final int appIdForProfile = ((Integer) appIdObj).intValue(); |
380 | 380 |
|
381 |
if ((invokingAppId == null && !checkResult.hasUPassAdminAccess()) |
|
382 |
|| invokingAppId.intValue() != appIdForProfile) { |
|
381 |
boolean permitted = true; |
|
383 | 382 |
|
384 |
rc = MinimalConstants.ERR_APP_SERV_NOT_PERMITTED; |
|
383 |
if (invokingAppId == null) { |
|
384 |
if (!checkResult.hasUPassAdminAccess()) |
|
385 |
permitted = false; |
|
385 | 386 |
|
386 |
} else { |
|
387 |
rc = modifyUserService.updateProfileShallowly(profile, txSession);
|
|
387 |
} else if (invokingAppId.intValue() != appIdForProfile) {
|
|
388 |
permitted = false;
|
|
388 | 389 |
} |
390 |
rc = permitted ? |
|
391 |
modifyUserService.updateProfileShallowly(profile, txSession) |
|
392 |
: MinimalConstants.ERR_APP_SERV_NOT_PERMITTED; |
|
393 |
|
|
389 | 394 |
} catch (MultipleAppAccessesFound e) { |
390 | 395 |
rc = MinimalConstants.ERR_APP_SERV_NOT_PERMITTED; |
391 | 396 |
e.printStackTrace(); |
... | ... | |
645 | 650 |
throw new UPassException(MinimalConstants.ERR_APP_SERV_NOT_PERMITTED); |
646 | 651 |
} |
647 | 652 |
List profiles = modifyUserService.listProfilesByExamples(exampleProfiles, fromDate, toDate, txSession); |
648 |
|
|
653 |
|
|
649 | 654 |
return profiles; |
650 | 655 |
|
651 | 656 |
} catch (MultipleAppAccessesFound e) { |
652 | 657 |
throw new UPassException(MinimalConstants.ERR_APP_SERV_NOT_PERMITTED, e); |
653 | 658 |
} |
654 | 659 |
} |
655 |
|
|
660 |
|
|
656 | 661 |
public static MaybankLdapDAO getMaybankLdapDAO() { |
657 | 662 |
synchronized (CONFIG_LOCK) { |
658 | 663 |
if (maybankLdapDAO == null) { |
Also available in: Unified diff