Class FiatPermissionEvaluator

  • All Implemented Interfaces:
    org.springframework.aop.framework.AopInfrastructureBean, org.springframework.security.access.PermissionEvaluator

    @Component
    public class FiatPermissionEvaluator
    extends java.lang.Object
    implements org.springframework.security.access.PermissionEvaluator
    • Method Detail

      • hasPermission

        public boolean hasPermission​(org.springframework.security.core.Authentication authentication,
                                     java.lang.Object resource,
                                     java.lang.Object authorization)
        Specified by:
        hasPermission in interface org.springframework.security.access.PermissionEvaluator
      • canCreate

        public boolean canCreate​(java.lang.String resourceType,
                                 java.lang.Object resource)
      • hasCachedPermission

        public boolean hasCachedPermission​(java.lang.String username)
        Parameters:
        username - the username to check
        Returns:
        whether a permission is currently cached for the username
      • hasPermission

        public boolean hasPermission​(java.lang.String username,
                                     java.io.Serializable resourceName,
                                     java.lang.String resourceType,
                                     java.lang.Object authorization)
      • hasPermission

        public boolean hasPermission​(org.springframework.security.core.Authentication authentication,
                                     java.io.Serializable resourceName,
                                     java.lang.String resourceType,
                                     java.lang.Object authorization)
        Specified by:
        hasPermission in interface org.springframework.security.access.PermissionEvaluator
      • invalidatePermission

        public void invalidatePermission​(java.lang.String username)
        Invalidates the cached permissions for a user.
        Parameters:
        username - the username of the user to invalidate from the local cache.
      • getPermission

        public com.netflix.spinnaker.fiat.model.UserPermission.View getPermission​(java.lang.String username)
      • storeWholePermission

        @Deprecated
        public boolean storeWholePermission()
        Deprecated.
      • isAdmin

        public boolean isAdmin()
      • isAdmin

        public boolean isAdmin​(org.springframework.security.core.Authentication authentication)