Class AccessTypePolicy

java.lang.Object
com.atlassian.bamboo.filter.AccessTypePolicy

public class AccessTypePolicy extends Object
This policy class checks for a given AccessType and information if anonymous access is allowed if a principal represented by an Authority has sufficient access rights represented by GrantedAuthoritys.

Here is a mapping of what GrantedAuthority is required for a given AccessType
- AccessType.UNRESTRICTED_ACCESS requires no authority
- AccessType.ANONYMOUS_SITE_ACCESS requires no authority if anonymous access is allowed otherwise it requires at least Authority.USER
- AccessType.EMPTY requires at least Authority.USER
Ļ - AccessType.LICENSED_ONLY requires at least Authority.USER. This is the default type and that is why AccessType.EMPTY requires the same Authority. In Bamboo there is no notion of unlicensed user (licence is for a number of agents) that is why AccessType.UNLICENSED_SITE_ACCESS requires the same Authority
- AccessType.UNLICENSED_SITE_ACCESS requires at least Authority.USER.
- AccessType.ADMIN_ONLY requires at least Authority.RESTRICTED_ADMIN
- AccessType.SYSTEM_ADMIN_ONLY requires at least Authority.ADMIN

Since:
10.0.0
  • Method Details

    • forAccessType

      public static AccessTypePolicy forAccessType(com.atlassian.sal.core.permission.AccessType accessType, boolean anonymousAccessAllowed)
    • hasAuthority

      public boolean hasAuthority(org.acegisecurity.Authentication authentication)