Subversion Repositories SmartDukaan

Rev

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

Rev 23938 Rev 23951
Line 36... Line 36...
36
	
36
	
37
	private static final Logger LOGGER = LogManager.getLogger(RoleManager.class);
37
	private static final Logger LOGGER = LogManager.getLogger(RoleManager.class);
38
 
38
 
39
	
39
	
40
	public boolean isAuthorizedURI(Set<Integer> roleIds, String contextPath, String uri, String method) throws ProfitMandiBusinessException{
40
	public boolean isAuthorizedURI(Set<Integer> roleIds, String contextPath, String uri, String method) throws ProfitMandiBusinessException{
-
 
41
		if(isAdmin(roleIds)) {
-
 
42
			LOGGER.info(uri + "[" + method+ "]");
-
 
43
			return true;
-
 
44
		}
41
		List<RoleApi> roleApis = roleApiRepository.selectByRoleIds(roleIds);
45
		List<RoleApi> roleApis = roleApiRepository.selectByRoleIds(roleIds);
42
		Set<Integer> apiIds = new HashSet<>();
46
		Set<Integer> apiIds = new HashSet<>();
43
		for(RoleApi roleApi : roleApis) {
47
		for(RoleApi roleApi : roleApis) {
44
			apiIds.add(roleApi.getApiId());
48
			apiIds.add(roleApi.getApiId());
45
		}
49
		}