org.mountcloud.springcloud.common.oauth2feigh.permission.OauthJsr250Voter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-cloud-common-oauth-feigh Show documentation
Show all versions of spring-cloud-common-oauth-feigh Show documentation
This project encapsulates the necessary functions of the oauth resource service, and encapsulates the oauth function of the weight client.
The newest version!
/**
*
*/
package org.mountcloud.springcloud.common.oauth2feigh.permission;
import java.util.Collection;
import org.mountcloud.springcloud.common.oauth2feigh.util.SecurityUtil;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.annotation.Jsr250Voter;
import org.springframework.security.core.Authentication;
/**
* @author zhanghaishan
* @version V1.0
* org.mountcloud.mvc.common.oauth2feigh.permission
* TODO: Jsr250Voter验证器添加系统用户验证
* 2020年1月13日.
*/
public class OauthJsr250Voter extends Jsr250Voter{
@Override
public int vote(Authentication authentication, Object object, Collection definition) {
//系统权限级别最高
if(SecurityUtil.isSystemUser()) {
return ACCESS_GRANTED;
}
return super.vote(authentication, object, definition);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy