Subversion Repositories SmartDukaan

Rev

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

Rev 23804 Rev 23884
Line 48... Line 48...
48
			if((uri.matches(contextPath + api.getUri()) || (uri + "/").matches(contextPath + api.getUri()) ||
48
			if((uri.matches(contextPath + api.getUri()) || (uri + "/").matches(contextPath + api.getUri()) ||
49
				uri.matches(contextPath + api.getUri() + "/")) && api.getMethod().equals(Method.valueOf(method))) {
49
				uri.matches(contextPath + api.getUri() + "/")) && api.getMethod().equals(Method.valueOf(method))) {
50
				return true;
50
				return true;
51
			}
51
			}
52
		}
52
		}
53
		throw new ProfitMandiBusinessException(ProfitMandiConstants.URI, uri, "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);
58
			LOGGER.info("Role Ids {}", roleIds);
Line 66... Line 66...
66
		}
66
		}
67
	}
67
	}
68
	public boolean isPartner(Set<Integer> roleIds) {
68
	public boolean isPartner(Set<Integer> roleIds) {
69
		try {
69
		try {
70
			Role rolePartner = roleRepository.selectByName(RoleType.FOFO.name());
70
			Role rolePartner = roleRepository.selectByName(RoleType.FOFO.name());
-
 
71
			LOGGER.info("isPartner {}", roleIds.contains(rolePartner.getId()));
71
			return roleIds.contains(rolePartner.getId());
72
			return roleIds.contains(rolePartner.getId());
72
		} catch(Exception e) {
73
		} catch(Exception e) {
73
			//This 
74
			//This 
74
			return false;
75
			return false;
75
		}
76
		}