Example #1
0
 public static bool VisitAuthority(IXForum forum, UserGroup userGroupInfo, int userId, ref string msg)
 {
     if (!Forums.AllowViewByUserId(forum.Permuserlist, userId))
     {
         if (string.IsNullOrEmpty(forum.Viewperm))
         {
             if (!userGroupInfo.AllowVisit)
             {
                 msg = "您当前的身份 \"" + userGroupInfo.GroupTitle + "\" 没有浏览该版块的权限";
                 return(false);
             }
         }
         else
         {
             if (!forum.AllowView(userGroupInfo.ID))
             {
                 msg = "您没有浏览该版块的权限";
                 return(false);
             }
         }
     }
     return(true);
 }