/** Check whether the user is in QUESTION_ADMIN role. */ public boolean checkUserQuestionAdmin(User u) { if (u != null) { return userRoleDao.isUserInRole(u.getUserId(), "QUESTION_ADMIN"); } else { return false; } }
/** Check whether the user is in SYSETM_ADMIN role. */ public boolean checkUserAdmin(User u) { if (u != null) { return userRoleDao.isUserInRole(u.getUserId(), "SYSTEM_ADMIN"); } else { return false; } }