nezuo / lapis

A DataStore abstraction library for Roblox
https://nezuo.github.io/lapis/
MIT License
55 stars 10 forks source link

Support for passing user IDs for GDPR removal #21

Closed littensy closed 10 months ago

littensy commented 11 months ago

Is there support for DataStore.SetAsync's userIds parameter (or UpdateAsync's version of it) to help with GDPR removal requests? If not, is it planned?

nezuo commented 11 months ago

It's not currently supported. It's something I do want to add, I just haven't had a need for it yet.

nezuo commented 10 months ago

The API I'm considering right now is the following:

Collection:load(key: string, defaultUserIds: { number }) Document:addUserId(userId: number) Document:removeUserId(userId: number)

defaultUserIds will only be used if the document doesn't already have any user ids set.

@littensy How do you feel about this?

nezuo commented 10 months ago

I realized that DataStoreKeyInfo:GetUserIds() will always return a table. The only way to know that the user ids have not been edited is when the key has never been set before. I'm thinking the defaultUserIds will only be used when the document is loaded for the first time.

littensy commented 10 months ago

It sounds good to me!