Exemplo n.º 1
0
        public static bool IsUserInForumRole(string username, int forumid)
        {
            IForum dal = Factory <IForum> .Create("Forum");

            string[] userroles = BusinessUtil.GetRolesForUser(username);

            string[] forumroles = dal.GetForumRoles(forumid);

            foreach (string forumrole in forumroles)
            {
                if (userroles.Contains(forumrole))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 2
0
        public static string[] GetForumRoles(int id)
        {
            IForum dal = Factory <IForum> .Create("Forum");

            return(dal.GetForumRoles(id));
        }