Klasse SecurityService

java.lang.Object
de.dlr.proseo.model.service.SecurityService

@Service public class SecurityService extends Object
Utility method for accessing Spring Security user data
Autor:
Dr. Thomas Bassler
  • Konstruktordetails

    • SecurityService

      public SecurityService()
  • Methodendetails

    • hasRole

      public boolean hasRole(UserRole role)
      Check, whether the logged in user has the given role
      Parameter:
      role - the user role to check
      Gibt zurück:
      true, if the role is in the user's list of roles, false otherwise
    • isAuthorizedForMission

      public boolean isAuthorizedForMission(String missionCode)
      Check, whether the logged in user is authorized for the given mission
      Parameter:
      missionCode - the mission code to check against
      Gibt zurück:
      true, if the user is authorized for this mission, false otherwise
    • getUser

      public String getUser()
      Gets the name of the logged in user
      Gibt zurück:
      the user name
    • getMission

      public String getMission()
      Gets the code of the logged in mission
      Gibt zurück:
      the mission code