//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web;
using System.Collections;
using CommunityServer.Components;
using System.Web.UI.WebControls;
using CommunityServer.Discussions.Components;

namespace CommunityServer.Discussions.Components {

    /// <summary>
    /// Summary description for ForumPermissions.
    /// </summary>
    public class ForumPermissions {




		public static ForumPermission GetForumPermission (int forumID, Guid roleID) {
		    ForumDataProvider dp = ForumDataProvider.Instance();
			
			ArrayList permissions = dp.GetForumPermissions(forumID);
			
			foreach (ForumPermission fp in permissions) {
				if (fp.RoleID == roleID) 
					return fp;
			}
			return null;
		}

        public static ArrayList GetForumPermissions (int forumID) {
            ForumDataProvider dp = ForumDataProvider.Instance();

            return dp.GetForumPermissions(forumID);
        }

  

    }
}
