@@ -118,6 +118,7 @@ public class SecurityUtils
*/
public static boolean isAdmin(Long userId)
{
- return userId != null && 1L == userId;
+ LoginUser user = (LoginUser) getAuthentication().getPrincipal();
+ return userId != null && "admin".equals(user.getUser().getUserName());
}