public class CacheableAuthorityManager
extends org.beangle.commons.dao.impl.BaseServiceImpl
implements org.beangle.security.access.AuthorityManager, org.beangle.commons.bean.Initializing
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,Set<?>> |
authorities
角色权限
|
protected RemoteAuthorityService |
authorityService |
protected Set<String> |
ignores |
protected Set<?> |
protectedResources
公有资源names
|
protected Set<String> |
publicResources
公开资源name
|
protected Set<String> |
roots |
| Constructor and Description |
|---|
CacheableAuthorityManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
init() |
boolean |
isAuthorized(org.beangle.security.core.context.SecurityContext context)
资源是否被授权
1)检查是否是属于公有资源 2)检查角色权限 |
boolean |
isAuthorized(org.beangle.security.core.context.SecurityContext context,
org.beangle.commons.security.Request request) |
boolean |
isRoot(String user) |
void |
refreshCache()
加载三类资源
|
Set<?> |
refreshRolePermissions(String authority) |
void |
setAuthorityService(RemoteAuthorityService authorityService) |
void |
setIgnores(Set<String> ignores) |
protected Set<?> protectedResources
protected RemoteAuthorityService authorityService
public boolean isAuthorized(org.beangle.security.core.context.SecurityContext context)
isAuthorized in interface org.beangle.security.access.AuthorityManagerpublic boolean isAuthorized(org.beangle.security.core.context.SecurityContext context,
org.beangle.commons.security.Request request)
isAuthorized in interface org.beangle.security.access.AuthorityManagerpublic void refreshCache()
public void init()
throws Exception
init in interface org.beangle.commons.bean.InitializingExceptionpublic void setAuthorityService(RemoteAuthorityService authorityService)
public boolean isRoot(String user)
isRoot in interface org.beangle.security.access.AuthorityManagerCopyright © 2014–2019 The OpenURP Software. All rights reserved.