/// <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); }
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); }
protected int GetPower(int power, ForumSpecialUserPower thePower) { return power |= (int)thePower; }
protected bool IsPower(int power, ForumSpecialUserPower thePower) { return (power & (int)thePower) != 0; }
protected string GetPowerImg(int power, ForumSpecialUserPower thePower) { return IsPower(power, thePower) ? "access_allow.gif" : "access_normal.gif"; }
/// <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; }