示例#1
0
 /** 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;
   }
 }
示例#2
0
 /** 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;
   }
 }