public DelayRenameCodeNameAction(OGUPermission.IOguObject oguObject, string oguPropertyName, string adObjectID, string adPropertyName) { this.oguObject = oguObject; this.oguPropertyName = oguPropertyName; this.adObjectID = adObjectID; this.adPropertyName = adPropertyName; }
public override void Convert(DataObjects.Security.Transfer.ObjectModifyType modifyType, OGUPermission.IOguObject srcObject, System.DirectoryServices.DirectoryEntry targetObject, string context) { IGroup grp = (IGroup)srcObject; SetterContext setterContext = new SetterContext(); ConvertProperties(srcObject, targetObject, setterContext); targetObject.Properties["displayNamePrintable"].Value = SynchronizeHelper.PermissionCenterInvolved; targetObject.CommitChanges(); DoAfterObjectUpdatedOP(srcObject, targetObject, setterContext); }
protected override bool ComparePropertyValue(OGUPermission.IOguObject srcOguObject, string srcPropertyName, ADObjectWrapper adObject, string targetPropertyName, string context) { string srcPropertyValue = null; if (srcOguObject.Properties[srcPropertyName] != null) srcPropertyValue = srcOguObject.Properties[srcPropertyName] as string; string targetPropertyValue = null; if (adObject.Properties[targetPropertyName] != null) targetPropertyValue = adObject.Properties[targetPropertyName].ToString(); bool result = false; if (srcPropertyValue != null && targetPropertyValue != null) result = srcPropertyValue == targetPropertyValue; return result; }
protected override bool ComparePropertyValue(OGUPermission.IOguObject srcOguObject, string srcPropertyName, ADObjectWrapper adObject, string targetPropertyName, string context) { if (srcOguObject.FullPath == SynchronizeContext.Current.SourceRootPath) { //名称以权限中心为准 return adObject.DN == SynchronizeHelper.AppendNamingContext(SynchronizeContext.Current.TargetRootOU); } else { string path = SynchronizeHelper.GetRelativePath(srcOguObject); if (path.IndexOf('\\') > 0) { return base.ComparePropertyValue(srcOguObject, srcPropertyName, adObject, targetPropertyName, context); } else { string dn = SynchronizeContext.Current.GetMappedName(srcOguObject.Name); return adObject.DN == SynchronizeHelper.AppendNamingContext(dn); } } }
protected override void SetPropertyValue(OGUPermission.IOguObject srcOguObject, string srcPropertyName, System.DirectoryServices.DirectoryEntry entry, string targetPropertyName, string context, DataObjects.Security.Transfer.SetterContext setterContext) { entry.Properties[srcPropertyName].Value = SynchronizeHelper.PermissionCenterInvolved; entry.CommitChanges(); }
/// <summary> /// 初始化此类的新实例 /// </summary> /// <param name="oguObject">要移动的OGU对象</param> /// <param name="parentDn">要移动到的父级DN</param> /// <param name="targetObjectID">要移动的AD对象ID(必须已经存在的)</param> public DelayMoveToAction(OGUPermission.IOguObject oguObject, string parentDn, Guid targetObjectID) { this.oguObject = oguObject; this.parentDn = parentDn; this.targetObjectID = targetObjectID; }
public DelayRenameAction(OGUPermission.IOguObject oguObject, string adObjectID) { this.oguObject = oguObject; this.adObjectID = adObjectID; }