Subversion Repositories SmartDukaan

Rev

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

Rev 23884 Rev 23938
Line 53... Line 53...
53
		throw new ProfitMandiBusinessException(ProfitMandiConstants.URI, uri + "[" + method+ "]", "GE_1004");
53
		throw new ProfitMandiBusinessException(ProfitMandiConstants.URI, uri + "[" + method+ "]", "GE_1004");
54
	}
54
	}
55
	
55
	
56
	public boolean isAdmin(Set<Integer> roleIds) {
56
	public boolean isAdmin(Set<Integer> roleIds) {
57
		try {
57
		try {
58
			LOGGER.info("Role Ids {}", roleIds);
-
 
59
			Role roleFofoAdmin = roleRepository.selectByName(RoleType.FOFO_ADMIN.name());
58
			Role roleFofoAdmin = roleRepository.selectByName(RoleType.FOFO_ADMIN.name());
60
			LOGGER.info("roleFofoAdmin {}", roleFofoAdmin);
-
 
61
			
-
 
62
			return roleIds.contains(roleFofoAdmin.getId());
59
			return roleIds.contains(roleFofoAdmin.getId());
63
		} catch(Exception e) {
60
		} catch(Exception e) {
64
			//This 
61
			//This 
65
			return false;
62
			return false;
66
		}
63
		}
67
	}
64
	}
68
	public boolean isPartner(Set<Integer> roleIds) {
65
	public boolean isPartner(Set<Integer> roleIds) {
69
		try {
66
		try {
70
			Role rolePartner = roleRepository.selectByName(RoleType.FOFO.name());
67
			Role rolePartner = roleRepository.selectByName(RoleType.FOFO.name());
71
			LOGGER.info("isPartner {}", roleIds.contains(rolePartner.getId()));
-
 
72
			return roleIds.contains(rolePartner.getId());
68
			return roleIds.contains(rolePartner.getId());
73
		} catch(Exception e) {
69
		} catch(Exception e) {
74
			//This 
70
			//This 
75
			return false;
71
			return false;
76
		}
72
		}