Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to remove extension when subscription expires #97

Open
KyrneDev opened this issue Oct 25, 2017 · 2 comments
Open

Attempt to remove extension when subscription expires #97

KyrneDev opened this issue Oct 25, 2017 · 2 comments

Comments

@KyrneDev
Copy link

The system should try to remove the extension from the users forum.

Things that should happen:

  • Extension should be uninstalled
  • Database tables/entires should stay untouched
  • Admin should be notified of uninstall
@clarkwinkelmann
Copy link
Contributor

I'm not too sure about the way we should handle this.

First, I don't believe we have planned to make any automated expiration available ? Unless there is an issue with a credit card the subscription needs to be explicitly ended. The current behavior of Bazaar (in #66) is to not offer the unsubscribe action for any installed extensions. You need to uninstall (not only disable) it beforehand.

Of course you can also unsubscribe via flagrow.io, which is where Bazaar should take action.

Technically, here's what happens: once unsubscribed, the Satis endpoint does not list the extension anymore. Access to tarballs on flagrow.io is also blocked. This means any require, install or update Composer commands will fail in Flarum unless an action is taken.

Here's my idea:

Bazaar should check if any unsubscribed extension is still installed and prompt the user to uninstall it before trying anything else with Bazaar.

Additionally a webhook could warn Bazaar of unsubscribe events coming from flagrow.io so Bazaar can block these extensions. I suggest we just disable them and prevent any attempt at re-enabling until the action described above is taken. Only disabling would remove the complicated matter of uninstalling an extension without running the migrations down (if we uninstall the source, we will never be able to run migrations down!).

@luceos
Copy link
Member

luceos commented Oct 26, 2017

@clarkwinkelmann I think we should consider the option for extension developers (which includes us) to specify they want to remove an extension once their subscription has expired. Hence I think this should not be the default behavior!

I think we can do this best using a webhook call.

Please understand that Bazaar will never ever get commands from us through the api (eg flagrow.io telling a bazaar to do uninstall an extension). We will only trigger it to start doing something (like flagrow.io saying bazaar to "there's something you need to take a look at" and Bazaar calling on Flagrow.io to read what it is it needs doing and then processing it).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants