Class DefaultPermRoleCombo

  • All Implemented Interfaces:
    org.springframework.core.Ordered , pro.fessional.wings.warlock.service.auth.impl.ComboWarlockAuthzService.Combo

    
    public class DefaultPermRoleCombo
     implements ComboWarlockAuthzService.Combo
                        

    Create GrantedAuthority by the mapping of user and permit

    Since:

    2021-03-05

    Author:

    trydofor

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      int getOrder()
      void setOrder(int order)
      boolean preAuth(@NotNull() DefaultWingsUserDetails details, @NotNull() HashSet<Object> role, @NotNull() HashSet<Object> perm) Prepare data for unified processing of roles and perm, e.g.
      WarlockGrantService getWarlockGrantService()
      void setWarlockGrantService(WarlockGrantService warlockGrantService)
      • Methods inherited from class pro.fessional.wings.warlock.service.auth.impl.ComboWarlockAuthzService.Combo

        postAuth
      • Methods inherited from class org.springframework.core.Ordered

        getOrder
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DefaultPermRoleCombo

        DefaultPermRoleCombo()
    • Method Detail

      • preAuth

         boolean preAuth(@NotNull() DefaultWingsUserDetails details, @NotNull() HashSet<Object> role, @NotNull() HashSet<Object> perm)

        Prepare data for unified processing of roles and perm, e.g. modify role and perm. Return `true` for solo processing, stopping any subsequent Combo (sort by Order), such as directly specify the permissions, no subsequent additions,

        Parameters:
        details - details with/without GrantedAuthority
        role - id(Long), name(String) or Auth(GrantedAuthority)
        perm - id(Long), name(String) or Auth(GrantedAuthority)
        Returns:

        Whether to stop any subsequent Combo, default false.