public bool OnApply() { _securityDescriptor.EditAce(_editedObjects, _addedObjects, _removedObjects, ref _securityDescriptor.pSecurityDescriptorOut); if (_securityDescriptor.pSecurityDescriptorOut == IntPtr.Zero) { return(false); } return(true); }
private void btnApply_Click(object sender, EventArgs e) { if (CheckForDeniedPermissions() && DataChanged) { DialogResult Dlg = MessageBox.Show(this, Properties.Resources.PermissionsWarningMsg, Properties.Resources.Console_Caption, MessageBoxButtons.OKCancel); if (Dlg == DialogResult.OK) { //Edit the DACL entries filled by the Permissions tab page _securityDescriptor.EditAce(_editedObjects, _addedObjects, _removedObjects, ref _securityDescriptor.pSecurityDescriptorOut); if (_securityDescriptor.pSecurityDescriptorOut == IntPtr.Zero) { MessageBox.Show(this, Properties.Resources.EditPermissionErrorDisplay, Properties.Resources.PermissionsWarningMsg, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } //TODO: Edit the SACL entries filled by the Audit tab page dataChanged = false; } } }