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

using System;
using System.Collections;
using CommunityServer.Components;
using CommunityServer.Files.Components;

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

		protected BaseFilesPage FilesPage
		{
			get {return this.PanelPage as BaseFilesPage;}
		}

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

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


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

		protected override ArrayList GetSectionPermissions(int SectionID)
		{
			return FileGalleryPermissions.GetFolderPermissions(SectionID);
		}

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

	}
}
