public abstract class BaseAccessDecisionVoter extends Object implements org.springframework.security.access.AccessDecisionVoter<org.aopalliance.intercept.MethodInvocation>
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log |
| Constructor and Description |
|---|
BaseAccessDecisionVoter(org.duracloud.account.db.repo.DuracloudRepoMgr repoMgr) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
asString(int decision) |
protected int |
castVote(int decision,
org.aopalliance.intercept.MethodInvocation invocation) |
protected Set<org.duracloud.account.db.model.AccountRights> |
getAllUserRightsForAcct(Long acctId) |
protected org.duracloud.account.db.model.DuracloudUser |
getCurrentUser(org.springframework.security.core.Authentication authentication) |
protected SecuredRule |
getRule(Collection<org.springframework.security.access.ConfigAttribute> atts) |
protected abstract Class<?> |
getTargetService()
This abstract method returns the class for which this voter has interest.
|
protected org.duracloud.account.db.model.AccountRights |
getUserRightsForAcct(Long userId,
Long acctId) |
protected Collection<String> |
getUserRoles(org.springframework.security.core.Authentication authentication) |
protected boolean |
hasVote(int vote) |
protected int |
numUsersForAccount(Long acctId) |
boolean |
supports(Class<?> clazz) |
boolean |
supports(org.springframework.security.access.ConfigAttribute attribute) |
protected boolean |
supportsTarget(org.aopalliance.intercept.MethodInvocation invocation) |
int |
vote(org.springframework.security.core.Authentication authentication,
org.aopalliance.intercept.MethodInvocation invocation,
Collection<org.springframework.security.access.ConfigAttribute> attributes) |
protected int |
voteHasRole(String role,
Collection<String> userRoles) |
protected abstract int |
voteImpl(org.springframework.security.core.Authentication authentication,
org.aopalliance.intercept.MethodInvocation invocation,
Collection<org.springframework.security.access.ConfigAttribute> attributes,
Object[] methodArgs,
org.duracloud.account.db.model.DuracloudUser user,
SecuredRule securedRule,
String role,
SecuredRule.Scope scope) |
protected int |
voteMyUserId(org.duracloud.account.db.model.DuracloudUser user,
Long userId) |
protected int |
voteMyUsername(org.duracloud.account.db.model.DuracloudUser user,
String username) |
protected int |
voteRolesAreSufficientToUpdateOther(Set<org.duracloud.account.db.model.Role> roles,
Set<org.duracloud.account.db.model.Role> other) |
protected int |
voteUserHasRoleOnAccount(org.duracloud.account.db.model.DuracloudUser user,
String role,
Long acctId) |
protected int |
voteUserHasRoleOnAcctToUpdateOthersRoles(Long userId,
Long acctId,
Long otherUserId,
Set<org.duracloud.account.db.model.Role> otherRoles) |
public BaseAccessDecisionVoter(org.duracloud.account.db.repo.DuracloudRepoMgr repoMgr)
protected abstract Class<?> getTargetService()
public boolean supports(org.springframework.security.access.ConfigAttribute attribute)
supports in interface org.springframework.security.access.AccessDecisionVoter<org.aopalliance.intercept.MethodInvocation>public boolean supports(Class<?> clazz)
supports in interface org.springframework.security.access.AccessDecisionVoter<org.aopalliance.intercept.MethodInvocation>protected boolean supportsTarget(org.aopalliance.intercept.MethodInvocation invocation)
protected SecuredRule getRule(Collection<org.springframework.security.access.ConfigAttribute> atts)
protected Collection<String> getUserRoles(org.springframework.security.core.Authentication authentication)
protected int voteHasRole(String role, Collection<String> userRoles)
protected int voteUserHasRoleOnAccount(org.duracloud.account.db.model.DuracloudUser user,
String role,
Long acctId)
protected int voteUserHasRoleOnAcctToUpdateOthersRoles(Long userId, Long acctId, Long otherUserId, Set<org.duracloud.account.db.model.Role> otherRoles)
protected int voteRolesAreSufficientToUpdateOther(Set<org.duracloud.account.db.model.Role> roles, Set<org.duracloud.account.db.model.Role> other)
protected boolean hasVote(int vote)
protected int numUsersForAccount(Long acctId)
protected org.duracloud.account.db.model.AccountRights getUserRightsForAcct(Long userId, Long acctId)
protected Set<org.duracloud.account.db.model.AccountRights> getAllUserRightsForAcct(Long acctId)
protected int voteMyUserId(org.duracloud.account.db.model.DuracloudUser user,
Long userId)
protected int voteMyUsername(org.duracloud.account.db.model.DuracloudUser user,
String username)
protected org.duracloud.account.db.model.DuracloudUser getCurrentUser(org.springframework.security.core.Authentication authentication)
protected String asString(int decision)
public final int vote(org.springframework.security.core.Authentication authentication,
org.aopalliance.intercept.MethodInvocation invocation,
Collection<org.springframework.security.access.ConfigAttribute> attributes)
vote in interface org.springframework.security.access.AccessDecisionVoter<org.aopalliance.intercept.MethodInvocation>protected int castVote(int decision,
org.aopalliance.intercept.MethodInvocation invocation)
protected abstract int voteImpl(org.springframework.security.core.Authentication authentication,
org.aopalliance.intercept.MethodInvocation invocation,
Collection<org.springframework.security.access.ConfigAttribute> attributes,
Object[] methodArgs,
org.duracloud.account.db.model.DuracloudUser user,
SecuredRule securedRule,
String role,
SecuredRule.Scope scope)
Copyright © 2009–2016 DuraSpace. All rights reserved.