Subversion Repositories SmartDukaan

Rev

Rev 27229 | Rev 27236 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27229 Rev 27235
Line 25... Line 25...
25
		boolean readOnly = false;
25
		boolean readOnly = false;
26
		Cookie[] cookies = request.getCookies();
26
		Cookie[] cookies = request.getCookies();
27
		if (cookies == null){
27
		if (cookies == null){
28
			throw new ProfitMandiBusinessException("cookies", "", "GE_1008");
28
			throw new ProfitMandiBusinessException("cookies", "", "GE_1008");
29
		}
29
		}
30
		String fofoIdFound = null, emailIdFound = null, roleIdsString = null;
30
		String fofoIdFound = null, emailIdFound = null, roleIdsString = null, readOnlyString = null;
31
		for(Cookie cookie : cookies){
31
		for(Cookie cookie : cookies){
32
			LOGGER.info("Requested Cookie {}={}", cookie.getName(), cookie.getValue());
32
			LOGGER.info("Requested Cookie {}={}", cookie.getName(), cookie.getValue());
33
			if(cookie.getName().equals(ProfitMandiConstants.FOFO_ID) && cookie.getValue() != null && !cookie.getValue().isEmpty()){
33
			if(cookie.getName().equals(ProfitMandiConstants.FOFO_ID) && cookie.getValue() != null && !cookie.getValue().isEmpty()){
34
				fofoIdFound = cookie.getValue();
34
				fofoIdFound = cookie.getValue();
35
			}
35
			}
Line 39... Line 39...
39
			if(cookie.getName().equals(ProfitMandiConstants.ROLE_IDS) && cookie.getValue() != null){
39
			if(cookie.getName().equals(ProfitMandiConstants.ROLE_IDS) && cookie.getValue() != null){
40
				roleIdsString = cookie.getValue();
40
				roleIdsString = cookie.getValue();
41
				//LOGGER.info("roleNameString is {}", roleNamesString);
41
				//LOGGER.info("roleNameString is {}", roleNamesString);
42
			}
42
			}
43
			if(cookie.getName().equals(ProfitMandiConstants.READONLY_KEY) && cookie.getValue() != null){
43
			if(cookie.getName().equals(ProfitMandiConstants.READONLY_KEY) && cookie.getValue() != null){
44
				readOnly = true;
44
				readOnlyString = cookie.getValue();
45
				//LOGGER.info("roleNameString is {}", roleNamesString);
45
				//LOGGER.info("roleNameString is {}", roleNamesString);
46
			}
46
			}
47
			if(fofoIdFound != null && emailIdFound != null && roleIdsString != null){
47
			if(fofoIdFound != null && emailIdFound != null && roleIdsString != null && readOnlyString != null){
48
				break;
48
				break;
49
			}
49
			}
50
		}
50
		}
51
		
51
		
52
		if(fofoIdFound == null || emailIdFound == null || roleIdsString == null){
52
		if(fofoIdFound == null || emailIdFound == null || roleIdsString == null){