private void btnEditPermissions_Click(object sender, EventArgs e)
{
TreeNode selectedNode = treeFolders.SelectedNode;
if (selectedNode == null)
return;
// First confirm that we can access the permissions.
hMailServer.IMAPFolder folder = selectedNode.Tag as hMailServer.IMAPFolder;
try
{
// This is a dummy test. We should never return here, but if we don't
// have access to the ACL permissions, a message should be shown.
if (folder.Permissions.Count < 0)
return;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, EnumStrings.hMailServerAdministrator, MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
formFolderPermissions folderPermissions = new formFolderPermissions(folder);
folderPermissions.ShowDialog();
}