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

using System;
using System.Collections;
using CommunityServer.Components;
using CommunityServer.Discussions.Components;

namespace CommunityServer.ControlPanel.UI
{
	/// <summary>
	/// Summary description for BaseForumPermissionsGridControl.
	/// </summary>
	public class BaseForumPermissionsGridControl : BasePermissionsGridControl
	{
		public BaseForumPermissionsGridControl()
		{
		}

		protected override ApplicationType applicationType{get{return ApplicationType.Forum;}}

		protected override Type PermissionType
		{
			get { return typeof(ForumPermission); }
		}
		
		protected BaseForumPage ForumPage
		{
			get {return this.PanelPage as BaseForumPage;}
		}


		protected override PermissionBase LoadPermission(int SectionID, Guid roleID)
		{
			return ForumPermissions.GetForumPermission(SectionID, roleID);
		}

		protected override ArrayList GetSectionPermissions(int SectionID)
		{
			return ForumPermissions.GetForumPermissions(SectionID);
		}

		protected override PermissionBase NewPermission()
		{
			return new ForumPermission();
		}

	}
}
