Subversion Repositories SmartDukaan

Rev

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

Rev 23803 Rev 23804
Line 43... Line 43...
43
		for(RoleApi roleApi : roleApis) {
43
		for(RoleApi roleApi : roleApis) {
44
			apiIds.add(roleApi.getApiId());
44
			apiIds.add(roleApi.getApiId());
45
		}
45
		}
46
		List<Api> apis = apiRepository.selectByIds(apiIds);
46
		List<Api> apis = apiRepository.selectByIds(apiIds);
47
		for(Api api : apis) {
47
		for(Api api : apis) {
-
 
48
			if((uri.matches(contextPath + api.getUri()) || (uri + "/").matches(contextPath + api.getUri()) ||
48
			if((uri.matches(contextPath + api.getUri()) || uri.matches(contextPath + api.getUri() + "/")) && api.getMethod().equals(Method.valueOf(method))) {
49
				uri.matches(contextPath + api.getUri() + "/")) && api.getMethod().equals(Method.valueOf(method))) {
49
				return true;
50
				return true;
50
			}
51
			}
51
		}
52
		}
52
		throw new ProfitMandiBusinessException(ProfitMandiConstants.URI, uri, "GE_1004");
53
		throw new ProfitMandiBusinessException(ProfitMandiConstants.URI, uri, "GE_1004");
53
	}
54
	}