Package de.dlr.proseo.model.service
Klasse SecurityService
java.lang.Object
de.dlr.proseo.model.service.SecurityService
Utility method for accessing Spring Security user data
- Autor:
- Dr. Thomas Bassler
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGets the code of the logged in missiongetUser()
Gets the name of the logged in userboolean
Check, whether the logged in user has the given roleboolean
isAuthorizedForMission
(String missionCode) Check, whether the logged in user is authorized for the given mission
-
Konstruktordetails
-
SecurityService
public SecurityService()
-
-
Methodendetails
-
hasRole
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
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
Gets the name of the logged in user- Gibt zurück:
- the user name
-
getMission
Gets the code of the logged in mission- Gibt zurück:
- the mission code
-