box-java-sdk icon indicating copy to clipboard operation
box-java-sdk copied to clipboard

true/false fields inaccurate for 'getCanSeeManagedUsers()' and 'getIsSyncEnabled()'

Open paapfly opened this issue 8 years ago • 2 comments

When using the Box Java SDK, the 'getCanSeeManagedUsers()' and 'getIsSyncEnabled()' methods on the BoxUser.Info object always return 'false'. These two flags are set to 'true' on users in our org but always return false. We need the Java SDK updated to reflect the actual state of the flags on the user.

paapfly avatar Jan 27 '17 23:01 paapfly

Hi @paapfly, can you confirm that you're passing in these fields in through the fields parameters? They're not returned by the API by default.

gcurtis avatar Feb 06 '17 04:02 gcurtis

There's definitely a workaround available here (making sure to pass these fields to getInfo(), but this really seems like a case of bad defaults. The fact that this field defaults to false when the field was not requested introduces uncertainty when the BoxUser.Info object is used: was the field actually false or just not requested by whoever generated the object?

We should look into how to address this sort of confusion around optional fields in the future, e.g. by using Boolean or Optional in some way.

mattwiller avatar Dec 24 '17 21:12 mattwiller