class AccountController {

	@RequestMapping(value = "/", method = RequestMethod.GET)
	@ResponseBody
	@PreAuthorize("hasRole('ROLE_ADMIN') or hasRole('ROLE_DEVICE_MANAGER') or hasRole('ROLE_DRPROGRAM')")
	public AbstractUserWithRoleDto registeredUser(Principal principal) {

		AbstractUser findOneByUsername = abstractUserDao.findOneByUsername(principal.getName());
		if (findOneByUsername != null) {
			return dtoMapper.map(findOneByUsername, AbstractUserWithRoleDto.class);
		}

		return null;
	}

}