org.squashtest.tm.service.security
Interface UserContextService
- All Known Implementing Classes:
- SpringSecurityUserContextService
public interface UserContextService
Provides information about the current user
- Author:
- Gregory Fouquet
getUsername
String getUsername()
- Returns:
- the username of the current user. If no user is authenticated, returns an empty string.
hasRole
boolean hasRole(String role)
- Parameters:
role -
- Returns:
- true if the current user has the given role.
getPrincipal
org.springframework.security.core.Authentication getPrincipal()
- Returns:
- the current user authentication object or
null if no user authenticated.
Copyright © 2010-2013 Henix, henix.fr. All Rights Reserved.