Closed anemchinova closed 3 years ago
@andre-paraense Do you have an estimate on when you may get a chance to review this PR? Thanks!
@andre-paraense Do you have an estimate on when you may get a chance to review this PR? Thanks!
Will try to review it this weekend!
@andre-paraense thank you for the review! apart from ios testes, it's ready for another round
@andre-paraense thank you for the review! apart from ios testes, it's ready for another round
Great, will get back to it as soon as possible
Requirements
Related issues
33 Private User Attributes
Describe the solution you've provided
This PR adds support for built-in user attributes and also an ability to configure both the built-in user attributes and custom attributes as private.
Built-in attributes
LaunchDarkly provides set of built-in user attributes like
firstName
,lastName
,email
, etc.The API was extended to accept a parameter of
LaunchDarklyUser
type in order to those attributes can be passed to LaunchDarkly SDK.Private attributes
There're three options to configure an attribute as private:
This PR adds support for all three.
In order to configure private attributes globally, pass an optional parameter of
LaunchDarklyConfig
type toinit
call.LaunchDarklyConfig
could be extended later for other client configuration options if required.In order to configure specific attributes as private for individual users, use
private
-prefixed arguments ofLaunchDarklyUser
or theprivateCustom
parameter ofinit
/identify
methods for custom attributes.Describe alternatives you've considered
Another solution could be to combine both built-in user attributes and custom attributes in a single free-from map.
I'm not sure the end users of the package will benefit a lot from the ability to distinguish between custom attributes and built-in attributes. So, potentially both custom and built-in user attributes could be simply passed as a free-form map:
Then, during parsing on the platform side, built-in attributes would be recognized among others and passed to LaunchDarkly SDK using an appropriate method. This could also prevent against unintentional usage of built-in user attribute keys as custom keys leading to data loss. From LaunchDarkly Android SDK docs:
The drawbacks of this approach vs the implemented approach:
custom
anymore. This introduces a backward incompatible change.Additional context
Settings user attributes
I would love to hear your feedback!