コード例 #1
0
		public DelayRenameCodeNameAction(OGUPermission.IOguObject oguObject, string oguPropertyName, string adObjectID, string adPropertyName)
		{
			this.oguObject = oguObject;
			this.oguPropertyName = oguPropertyName;
			this.adObjectID = adObjectID;
			this.adPropertyName = adPropertyName;
		}
コード例 #2
0
		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);
		}
コード例 #3
0
		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;
		}
コード例 #4
0
		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);
				}
			}
		}
コード例 #5
0
		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();
		}
コード例 #6
0
		/// <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;
		}
コード例 #7
0
		public DelayRenameAction(OGUPermission.IOguObject oguObject, string adObjectID)
		{
			this.oguObject = oguObject;
			this.adObjectID = adObjectID;
		}