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
701 stars 40 forks source link

Add support for a one-to-many groups relationship #748

Open visortelle opened 11 months ago

visortelle commented 11 months ago

Can a single user be a member of multiple groups?

ezekg commented 11 months ago

No. Currently, resources can belong to a single group. What's your use case here?

visortelle commented 11 months ago

In my case, one user account may belong to several different organizations.

It's similar to how organizations work on GitHub. You can be a member of the keygen-sh organization and at the same time be a member of the microsoft organization.

Each organization may buy products on a per-seat or metered model, e.g. increase organization members count limit or buy additional GitHub Actions minutes.

I supposed that I can implement this way:

@ezekg I'm new to Keygen and maybe I'm missing something.

ezekg commented 11 months ago

Currently, this type of grouping is not possible. You'll probably need to accomplish this grouping outside of Keygen, using user metadata as a lookup table instead of using the group relationship. Updating the issue to reflect the feature request.