日期:2014-05-16  浏览次数:21096 次

springsecurity 之 SpecialAccessDecision.java 补充

if(perm.getLv()<=0)
??? ???{
??? ????if(isTopAdmin(url,hasRole,String.valueOf(perm.getLv())))
??? ????{
??? ?????return true;
??? ????}
??? ???}
??? ???if(perm.getResources()==null || perm.getResources().size()==0)
??? ???{
??? ????continue;
??? ???}
??? ???else
??? ???{
??? ????rescs = new ArrayList<Resource>(perm.getResources());
??????????? ??if(rescs!=null && rescs.size()>0)
??????????? ??{
??????? ???? ??for(Resource resc : rescs)
??????? ???? ??{
??????? ???? ???if (urlMatcher.pathMatchesUrl(resc.getResourceName(), url)) {
??????? ???? ????if(allowAccessUnspecialUrl(url))
??????? ???? ????{
??????? ???? ?????return true;
??????? ???? ????}???? ????
??????? ???? ???}
??????? ???? ??}
??????????? ??}
????}??????? ??
??? ??}??? ??
??? ?}
??? ?return false;
??? }
}