lorawan-stack
lorawan-stack copied to clipboard
Refactor Identity Server Store interfaces
Summary
It would be good to make some changes to some Identity Server Store interfaces to make methods more "single-purpose".
Current Situation
- The
SetMember
method of theMembershipStore
interface deletes a collaborator when passing zero rights. - The
UpdateAPIKey
method of theAPIKeyStore
interface deletes an API key when passing zero rights. - The
Validate
method of theContactInfoStore
does multiple things that should be "business logic" instead of "store logic":- Getting a
ContactInfoValidation
- Checking for already used / expired
- Marking
ContactInfo
as "validated" - Validating the primary email address of a user
- Marking the
ContactInfoValidation
as "used"
- Getting a
- Similarly for the
SetInvitationAcceptedBy
method of theInvitationStore
Desired Situation
- The
MembershipStore
interface should have separate methods for updating and deleting collaborators. - The
APIKeyStore
interface should have separate methods for updating and deleting API keys. - The
ContactInfoStore
should have separate methods for each of the tasks described above. Other business logic belongs in the RPC implementation. - Similar story for the
InvitationStore
.
Code of Conduct
- [X] I agree to follow TTN's Community Code of Conduct.
Blocked on #3250, so for triage let's just assign someone, and maybe schedule it for Q4 or so.
cc: @NicolasMrad
What is the status here ?
I saw that we have a branch already, and I am wondering how much is left in order to schedule this for review and merging.
It was supposed to be finished on the Thursday two weeks ago but didn't managed to do it. I'm pretty confident in finishing this Thursday.
This was actually finished on v3.26.1
the related RPC implementation is the continuation based on the addition of the delete methods in the interfaces.
Therefore I'll be closing this issue.