keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
700 stars 40 forks source link

Update license user association from has one to has many #768

Closed ezekg closed 5 months ago

ezekg commented 7 months ago

Closes #534.

Prerequisites

Pre-deploy

Post-deploy

ezekg commented 6 months ago

New plan: with the proof of concept union_of gem, we're able to create associations that union across multiple associations. This allows us to really clean up our implementation here, and gets rid of the need to do a multi-part PR.

Let's clean up union_of and add more exhaustive tests, and go in the direction mentioned in https://github.com/keygen-sh/keygen-api/issues/534#issuecomment-1858574833.

ezekg commented 5 months ago

Should a machine belong to an owner? Right now, it doesn't make sense that a machine always belongs to the owner of the license, since in reality, it could belong to any of the license's licensees, not necessarily the license's owner.