Skip to content

Commit

Permalink
Merge pull request #77 from box/user-bulk-bug
Browse files Browse the repository at this point in the history
Bumped SDK version, added tracking_codes, corrected error that includ…
  • Loading branch information
allenmichael authored Apr 5, 2018
2 parents 4de873d + 1440996 commit 57274d8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion BoxCLI/BoxCLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<PackageId>BoxCLI</PackageId>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Box.V2.Core" Version="3.4.2" />
<PackageReference Include="Box.V2.Core" Version="3.6.0" />
<PackageReference Include="CsvHelper" Version="2.16.3.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="1.1.0" />
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
Expand Down
15 changes: 1 addition & 14 deletions BoxCLI/CommandUtilities/CsvModels/BoxUserMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public BoxUserMap()
Map(m => m.IsExemptFromDeviceLimits);
Map(m => m.IsExemptFromLoginVerification);
Map(m => m.CanSeeManagedUsers);
// Map(m => m.TrackingCodes).TypeConverter<TrackingCodesConverter>();
Map(m => m.TrackingCodes);
}
}

Expand All @@ -44,17 +44,4 @@ public BoxUserEnterpriseMap()
Map(m => m.Type).Ignore();
}
}

// public class TrackingCodesConverter : DefaultTypeConverter
// {
// public override string ConvertToString(TypeConverterOptions options, object value)
// {
// var stringVal = (string[])value;
// if(stringVal == null)
// {
// stringVal = new string[0];
// }
// return string.Join("\n", stringVal);
// }
// }
}
1 change: 0 additions & 1 deletion BoxCLI/CommandUtilities/CsvModels/BoxUserRequestMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ public sealed class BoxUserRequestMap : CsvClassMap<BoxUserRequest>
{
public BoxUserRequestMap()
{
Map(m => m.Id);
Map(m => m.Login);
Map(m => m.Name);
Map(m => m.IsPlatformAccessOnly);
Expand Down
4 changes: 2 additions & 2 deletions BoxCLI/Commands/UserSubCommands/UserSubCommandBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public UserSubCommandBase(IBoxPlatformServiceBuilder boxPlatformBuilder, IBoxHom
"max_upload_size",
"space_amount",
"space_used",
// "tracking_codes",
"tracking_codes",
"is_platform_access_only",
"is_sync_enabled",
"is_exempt_from_login_verification",
Expand Down Expand Up @@ -187,7 +187,7 @@ protected BoxUserRequest CreateUserRequest(string name = "", string userId = "",
if (isExemptFromLoginVerificaton) { userRequest.IsExemptFromLoginVerification = true; }
if (notExemptFromLoginVerification) { userRequest.IsExemptFromLoginVerification = false; }
if (isPasswordResetRequired) { userRequest.IsPasswordResetRequired = true; }

return userRequest;
}
protected async Task UpdateUsersFromFile(string path,
Expand Down

0 comments on commit 57274d8

Please sign in to comment.