Revision 105:2a3bee63eae6

View differences:

src/main/java/my/com/upass/maybank/MinimalMaybankFacadeImpl.java
17 17
import my.com.upass.pojo.ClientApp;
18 18
import my.com.upass.pojo.MinimalUserBean;
19 19
import my.com.upass.pojo.UserAppAccess;
20
import my.com.upass.services.AppAccessMgtService;
20 21

  
21 22
import org.apache.log4j.Logger;
22 23
import org.hibernate.Session;
......
281 282
							appAccessId, hashedSecretKey, user, UserAppAccess.TYPE_USER, session);
282 283

  
283 284
			if (rc == MinimalConstants.ERR_SUCCESS) {
284
				UserProfile existingProfile = minUpcV2.findProfile(
285
						appAccessId, hashedSecretKey, user.getUsername(), session);
285
				final String username = user.getUsername();
286
				final Integer appId = AppAccessMgtService.getAppIdForProfile(profile);
287
				Character accessType = minUpcV2.getAppAccessType(username, appId, session);
286 288

  
287
				rc = existingProfile == null ?
289
				rc = accessType == null ?
288 290
						minUpcV2.updateProfileShallowly(appAccessId, hashedSecretKey, profile, session)
289 291
						: MinimalConstants.ERR_ALREADY_EXIST;
290 292

  

Also available in: Unified diff