Class MyUserPrincipal

java.lang.Object
app.valuationcontrol.webservice.securityhelpers.MyUserPrincipal
All Implemented Interfaces:
Serializable, org.springframework.security.core.userdetails.UserDetails

public class MyUserPrincipal extends Object implements org.springframework.security.core.userdetails.UserDetails
See Also:
  • Constructor Details

    • MyUserPrincipal

      public MyUserPrincipal(User user)
  • Method Details

    • hasModelRole

      public Boolean hasModelRole(Model model, String role) throws org.springframework.security.access.AccessDeniedException
      Throws:
      org.springframework.security.access.AccessDeniedException
    • hasModelRole

      public Boolean hasModelRole(Long modelId, String role) throws org.springframework.security.access.AccessDeniedException
      Throws:
      org.springframework.security.access.AccessDeniedException
    • hasAccessToTemplate

      public Boolean hasAccessToTemplate(Long templateId) throws org.springframework.security.access.AccessDeniedException
      Throws:
      org.springframework.security.access.AccessDeniedException
    • canUnlock

      public Boolean canUnlock(Model model, String role) throws org.springframework.security.access.AccessDeniedException
      Throws:
      org.springframework.security.access.AccessDeniedException
    • getAuthorities

      public Collection<? extends org.springframework.security.core.GrantedAuthority> getAuthorities()
      Specified by:
      getAuthorities in interface org.springframework.security.core.userdetails.UserDetails
    • getPassword

      public String getPassword()
      Specified by:
      getPassword in interface org.springframework.security.core.userdetails.UserDetails
    • getUsername

      public String getUsername()
      Specified by:
      getUsername in interface org.springframework.security.core.userdetails.UserDetails
    • isAccountNonExpired

      public boolean isAccountNonExpired()
      Specified by:
      isAccountNonExpired in interface org.springframework.security.core.userdetails.UserDetails
    • isAccountNonLocked

      public boolean isAccountNonLocked()
      Specified by:
      isAccountNonLocked in interface org.springframework.security.core.userdetails.UserDetails
    • isCredentialsNonExpired

      public boolean isCredentialsNonExpired()
      Specified by:
      isCredentialsNonExpired in interface org.springframework.security.core.userdetails.UserDetails
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface org.springframework.security.core.userdetails.UserDetails