Class SpaceWriteAccessVoter

java.lang.Object
org.duracloud.security.vote.SpaceAccessVoter
org.duracloud.security.vote.SpaceWriteAccessVoter
All Implemented Interfaces:
org.springframework.security.access.AccessDecisionVoter

public class SpaceWriteAccessVoter extends SpaceAccessVoter
This class decides if a caller has WRITE access to a given resource. If the caller is seeking READ access to this resource, this class abstains from casting a vote.
Author:
Andrew Woods Date: 11/18/11
  • Constructor Details

    • SpaceWriteAccessVoter

      public SpaceWriteAccessVoter(StorageProviderFactory storageProviderFactory, org.springframework.security.core.userdetails.UserDetailsService userDetailsService)
  • Method Details

    • vote

      public int vote(org.springframework.security.core.Authentication auth, Object resource, Collection config)
      This method checks the ACL state of the arg resource (space and provider) and denies access to principals if they are anonymous or if they do not have a WRITE ACL for the space.
      Parameters:
      auth - principal seeking AuthZ
      resource - that is under protection
      config - access-attributes defined on resource
      Returns:
      vote (AccessDecisionVoter.ACCESS_GRANTED, ACCESS_DENIED, ACCESS_ABSTAIN)