update to v1.1.3

This commit is contained in:
zlt
2019-02-12 21:34:29 +08:00
parent 0c72395d25
commit 09394b9f4b
31 changed files with 33 additions and 34 deletions
@@ -5,7 +5,7 @@
<parent>
<groupId>com.zlt</groupId>
<artifactId>zlt-commons</artifactId>
<version>1.1.0</version>
<version>1.1.3</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
@@ -47,7 +47,6 @@ public abstract class DefaultPermissionServiceImpl implements IPermissionService
if (HttpMethod.OPTIONS.name().equalsIgnoreCase(request.getMethod())) {
return true;
}
boolean hasPermission = false;
if (!(authentication instanceof AnonymousAuthenticationToken)) {
//判断是否开启url权限验证
if (!securityProperties.getAuth().isUrlEnabled()) {
@@ -59,7 +58,7 @@ public abstract class DefaultPermissionServiceImpl implements IPermissionService
return true;
}
//判断认证通过后,所以用户都能访问的url
//判断认证通过后,所有用户都能访问的url
for (String path : securityProperties.getIgnore().getMenusPaths()) {
if (antPathMatcher.match(path, request.getRequestURI())) {
return true;
@@ -69,7 +68,7 @@ public abstract class DefaultPermissionServiceImpl implements IPermissionService
List<SimpleGrantedAuthority> grantedAuthorityList = (List<SimpleGrantedAuthority>) authentication.getAuthorities();
if (CollectionUtil.isEmpty(grantedAuthorityList)) {
log.warn("角色列表为空:{}", authentication.getPrincipal());
return hasPermission;
return false;
}
String roleCodes = grantedAuthorityList.stream().map(SimpleGrantedAuthority::getAuthority).collect(Collectors.joining(", "));
@@ -83,6 +82,6 @@ public abstract class DefaultPermissionServiceImpl implements IPermissionService
}
}
return hasPermission;
return false;
}
}