public JsonResult Dismiss() { if (!Permission.LoginedNeed(Request, Response, Session)) { return(Json(false)); } User user = (User)Session["user"]; int gid = Convert.ToInt32(Request["gid"]); GroupMember memberInfo = GroupView.GetGroupMember(user.uid, gid); if (memberInfo == null || memberInfo.rank != (int)MemberRank.CREATOR) { return(Json(false)); } groupsCache = GroupView.GetAllGroups(); return(Json(GroupView.DismissGroup(gid))); }