You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modified TaskPrincipal to handle odd condition #835 where UserId is stored as DOMAIN\User rather than the SID. The Account property will now always display the name.
/// <summary>Initializes a new instance of the <see cref="User"/> class.</summary>
13
13
/// <param name="userName">
14
-
/// Name of the user. This can be in the format <c>DOMAIN\username</c> or <c>username@domain.com</c> or <c>username</c> or <c>null</c> (for current user).
14
+
/// Name of the user. This can be in the format <c>DOMAIN\username</c> or <c>username@domain.com</c> or <c>username</c> or
15
+
/// <c>null</c> (for current user).
15
16
/// </param>
16
17
publicUser(stringuserName=null)
17
18
{
18
-
varcur=WindowsIdentity.GetCurrent();
19
19
if(string.IsNullOrEmpty(userName))userName=null;
20
-
// 2018-03-02: Hopefully not a breaking change, but by adding in the comparison of an account name without a domain and the current user, there is a
21
-
// chance that current implementations will break given the condition that a local account with the same name as a domain account exists and the
22
-
// intention was to prefer the local account. In such a case, the developer should prepend the user name in TaskDefinition.Principal.UserId with the
23
-
// machine name of the local machine.
20
+
// 2018-03-02: Hopefully not a breaking change, but by adding in the comparison of an account name without a domain and the
21
+
// current user, there is a chance that current implementations will break given the condition that a local account with the same
22
+
// name as a domain account exists and the intention was to prefer the local account. In such a case, the developer should
23
+
// prepend the user name in TaskDefinition.Principal.UserId with the machine name of the local machine.
0 commit comments