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

using System;
using System.Collections;
using CommunityServer.Blogs.Components;
using CommunityServer.Components;

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

		protected BaseBlogPage BlogPage
		{
			get {return this.PanelPage as BaseBlogPage;}
		}

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

		protected override Type PermissionType
		{
			get { return typeof(WeblogPermission);}
		}


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

		protected override ArrayList GetSectionPermissions(int SectionID)
		{
			return WeblogPermissions.GetBlogPermissions(SectionID);
		}

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

	}
}
