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

Add multi-user licenses #774

Closed ezekg closed 4 months ago

ezekg commented 5 months ago

Renamed #768. Closes #534. TL;DR: licenses had-one user, now licenses have-many users.

Prerequisites

Pre-deploy

Post-deploy

# Add new permissions and event types
rake db:seed

# Migrate existing role permissions
rake keygen:permissions:admins:add[license.users.attach,license.users.detach,license.owner.update,machine.owner.update]
rake keygen:permissions:environments:add[license.users.attach,license.users.detach,license.owner.update,machine.owner.update]
rake keygen:permissions:products:add[license.users.attach,license.users.detach,license.owner.update,machine.owner.update]
ezekg commented 5 months ago

When we roll this out, should we set the DEFAULT_API_VERSION to v1.5 so we have ample time to run the permission tasks? Then once things are ready and documentation has been updated, we can start putting new accounts into v1.6.

As long as docs are updated, the migrations shouldn't take too long. I doubt a new account is going to swoop in, fully onboarded, trying to utilize the new endpoints within the time we deploy and the time our migrations complete.

Skipping because this just adds an unnecessary step.

ezekg commented 5 months ago

CI is failing here and on master because a Ruby 3.2.3 image isn't available yet.

Will re-run later.

ezekg commented 5 months ago

Currently waiting on audit and review of union_of.

sentry-io[bot] commented 4 months ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎