/* * Copyright (c) 2013 Honyee Industry Group Co., Ltd * www.honyee.biz * All rights reserved. * * This software is the confidential and proprietary information of * Honyee Industry Group Co., Ltd ("Confidential Information"). * You shall not disclose such Confidential Information and shall use * it only in accordance with the terms of the license agreement you * entered into with Honyee Industry Group Co., Ltd. */ package cc.wdcy.domain.shared.security; import cc.wdcy.domain.user.User; /** * @author Shengzhao Li */ public class SecurityUtils { private static SecurityHolder securityHolder; public void setSecurityHolder(SecurityHolder securityHolder) { SecurityUtils.securityHolder = securityHolder; } public static User currentUser() { HonyeeUserDetails userDetails = securityHolder.userDetails(); return (userDetails != null ? userDetails.user() : null); } }