Beispiel #1
0
 /// <summary>
 /// 检查特殊用户权限
 /// </summary>
 /// <param name="permUserList">特殊用户列表</param>
 /// <param name="userId">查看权限用户ID</param>
 /// <param name="forumSpecialUserPower">论坛特殊用户权限</param>
 /// <returns></returns>
 private static bool ValidateSpecialUserPerm(string permUserList, int userId, ForumSpecialUserPower forumSpecialUserPower)
 {
     if (!Utils.StrIsNullOrEmpty(permUserList))
     {
         ForumSpecialUserPower forumspecialuserpower = (ForumSpecialUserPower)GetForumSpecialUserPower(permUserList, userId);
         if (((int)(forumspecialuserpower & forumSpecialUserPower)) > 0)
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #2
0
 private static bool ValidateSpecialUserPerm(string permUserList, int userId, ForumSpecialUserPower forumSpecialUserPower)
 {
     if (!permUserList.IsNullOrEmpty())
     {
         ForumSpecialUserPower forumSpecialUserPower2 = (ForumSpecialUserPower)Forums.GetForumSpecialUserPower(permUserList, userId);
         if ((forumSpecialUserPower2 & forumSpecialUserPower) > (ForumSpecialUserPower)0)
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #3
0
 protected int GetPower(int power, ForumSpecialUserPower thePower)
 {
     return power |= (int)thePower;
 }
Beispiel #4
0
 protected bool IsPower(int power, ForumSpecialUserPower thePower)
 {
     return (power & (int)thePower) != 0;
 }
Beispiel #5
0
 protected string GetPowerImg(int power, ForumSpecialUserPower thePower)
 {
     return IsPower(power, thePower) ? "access_allow.gif" : "access_normal.gif";
 }
Beispiel #6
0
 /// <summary>
 /// 检查特殊用户权限
 /// </summary>
 /// <param name="permUserList">特殊用户列表</param>
 /// <param name="userId">查看权限用户ID</param>
 /// <param name="forumSpecialUserPower">论坛特殊用户权限</param>
 /// <returns></returns>
 private static bool ValidateSpecialUserPerm(string permUserList, int userId, ForumSpecialUserPower forumSpecialUserPower)
 {
     if (!Utils.StrIsNullOrEmpty(permUserList))
     {
         ForumSpecialUserPower forumspecialuserpower = (ForumSpecialUserPower)GetForumSpecialUserPower(permUserList, userId);
         if (((int)(forumspecialuserpower & forumSpecialUserPower)) > 0)
             return true;
     }
     return false;
 }