public abstract class SpaceAccessVoter extends Object implements org.springframework.security.access.AccessDecisionVoter
Constructor and Description |
---|
SpaceAccessVoter(StorageProviderFactory storageProviderFactory,
org.springframework.security.core.userdetails.UserDetailsService userDetailsService) |
Modifier and Type | Method and Description |
---|---|
protected javax.servlet.http.HttpServletRequest |
getHttpServletRequest(Object resource) |
protected HttpVerb |
getHttpVerb(javax.servlet.http.HttpServletRequest httpRequest) |
protected Map<String,AclType> |
getSpaceACLs(javax.servlet.http.HttpServletRequest request)
This method returns the ACLs of the requested space, or an empty-map if
there is an error or for certain 'keyword' spaces, or null if the space
does not exist.
|
protected String |
getSpaceId(javax.servlet.http.HttpServletRequest httpRequest) |
protected StorageProvider |
getStorageProvider(String storeId)
This method provides entry-point for alternate implementations of
StorageProvider.
|
protected StorageProviderFactory |
getStorageProviderFactory() |
protected String |
getStoreId(javax.servlet.http.HttpServletRequest httpRequest) |
protected List<String> |
getUserGroups(org.springframework.security.core.Authentication auth) |
protected boolean |
groupsHaveReadAccess(List<String> userGroups,
Map<String,AclType> acls) |
protected boolean |
groupsHaveWriteAccess(List<String> userGroups,
Map<String,AclType> acls) |
protected boolean |
hasContentId(javax.servlet.http.HttpServletRequest httpRequest) |
protected boolean |
hasReadAccess(String name,
Map<String,AclType> acls) |
protected boolean |
hasWriteAccess(String name,
Map<String,AclType> acls) |
protected boolean |
isAdmin(String name) |
protected boolean |
isOpenResource(javax.servlet.http.HttpServletRequest httpRequest) |
boolean |
supports(Class aClass)
This methods returns true if the arg class is an instance of or
subclass of FilterInvocation.
|
boolean |
supports(org.springframework.security.access.ConfigAttribute configAttribute)
This method always returns true because all configAttributes are able
to be handled by this voter.
|
public SpaceAccessVoter(StorageProviderFactory storageProviderFactory, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
protected StorageProviderFactory getStorageProviderFactory()
protected boolean isOpenResource(javax.servlet.http.HttpServletRequest httpRequest)
protected String getStoreId(javax.servlet.http.HttpServletRequest httpRequest)
protected String getSpaceId(javax.servlet.http.HttpServletRequest httpRequest)
protected boolean hasContentId(javax.servlet.http.HttpServletRequest httpRequest)
protected Map<String,AclType> getSpaceACLs(javax.servlet.http.HttpServletRequest request)
request
- containing spaceId and storeIdprotected HttpVerb getHttpVerb(javax.servlet.http.HttpServletRequest httpRequest)
protected List<String> getUserGroups(org.springframework.security.core.Authentication auth)
protected boolean groupsHaveReadAccess(List<String> userGroups, Map<String,AclType> acls)
protected boolean groupsHaveWriteAccess(List<String> userGroups, Map<String,AclType> acls)
protected boolean isAdmin(String name)
protected StorageProvider getStorageProvider(String storeId)
protected javax.servlet.http.HttpServletRequest getHttpServletRequest(Object resource)
public boolean supports(org.springframework.security.access.ConfigAttribute configAttribute)
supports
in interface org.springframework.security.access.AccessDecisionVoter
configAttribute
- any attpublic boolean supports(Class aClass)
supports
in interface org.springframework.security.access.AccessDecisionVoter
aClass
- to be analyized for an AuthZ vote.Copyright © 2009–2014 DuraSpace. All rights reserved.