|
|
@@ -3,7 +3,7 @@ package com.uas.platform.b2b.support;
|
|
|
import java.util.Collection;
|
|
|
import java.util.Iterator;
|
|
|
|
|
|
-import org.apache.log4j.Logger;
|
|
|
+//import org.apache.log4j.Logger;
|
|
|
import org.springframework.security.access.AccessDecisionManager;
|
|
|
import org.springframework.security.access.AccessDeniedException;
|
|
|
import org.springframework.security.access.ConfigAttribute;
|
|
|
@@ -23,7 +23,7 @@ public class CustomAccessDecisionManager implements AccessDecisionManager {
|
|
|
/**
|
|
|
* LOGGER 日志对象
|
|
|
*/
|
|
|
- private final static Logger LOGGER = Logger.getLogger(CustomAccessDecisionManager.class);
|
|
|
+// private final static Logger LOGGER = Logger.getLogger(CustomAccessDecisionManager.class);
|
|
|
|
|
|
/**
|
|
|
* @param authentication
|
|
|
@@ -34,7 +34,7 @@ public class CustomAccessDecisionManager implements AccessDecisionManager {
|
|
|
*/
|
|
|
public void decide(Authentication authentication, Object object, Collection<ConfigAttribute> configAttributes)
|
|
|
throws AccessDeniedException, InsufficientAuthenticationException {
|
|
|
- LOGGER.info("CustomAccessDecisionManager.decide");
|
|
|
+// LOGGER.info("CustomAccessDecisionManager.decide");
|
|
|
|
|
|
if (null == configAttributes || configAttributes.size() == 0) {
|
|
|
return;
|
|
|
@@ -47,9 +47,9 @@ public class CustomAccessDecisionManager implements AccessDecisionManager {
|
|
|
|
|
|
needRole = c.getAttribute();
|
|
|
|
|
|
- LOGGER.info("菜单访问权限:" + needRole);
|
|
|
+// LOGGER.info("菜单访问权限:" + needRole);
|
|
|
for (GrantedAuthority ga : authentication.getAuthorities()) {
|
|
|
- System.out.println(ga.getAuthority());
|
|
|
+// System.out.println(ga.getAuthority());
|
|
|
if (needRole.trim().equals(ga.getAuthority())) {
|
|
|
return;
|
|
|
}
|