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

Manually lock outgrown enterprise accounts #2197

Merged
merged 8 commits into from
Sep 20, 2022

Conversation

vinibrsl
Copy link
Contributor

@vinibrsl vinibrsl commented Sep 9, 2022

Changes

This pull request adapts the account locking and grace period flow to enterprise customers. A quick summary of the changes:

  • Enables the grace period mechanism for enterprise accounts on Workers.CheckUsage, therefore showing existing dashboard alerts
  • Creates a manual_lock field in the grace_period JSON, that when true, does not expire the grace period automatically, therefore preventing Workers.LockSites to lock enterprise customers
  • Adds a lock/unlock button to the internal CRM users page
  • Tests new existing and new functionality

I recorded this screencast previewing the feature. There's been some refactoring, so small commits can help reviewing.

Tests

  • Automated tests have been added

Changelog

  • Entry has been added to changelog

Documentation

  • This change does not need a documentation update

Dark mode

  • This PR does not change the UI

@bundlemon
Copy link

bundlemon bot commented Sep 9, 2022

BundleMon

Unchanged files (7)
Status Path Size Limits
static/css/app.css
515.19KB -
static/js/dashboard.js
295.63KB -
static/js/app.js
12.13KB -
static/js/embed.host.js
5.58KB -
static/js/embed.content.js
5.06KB -
tracker/js/plausible.js
748B -
static/js/applyTheme.js
314B -

No change in files bundle size

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@vinibrsl vinibrsl force-pushed the enterprise-plan-usage-emails branch 5 times, most recently from 1829a12 to 3be6fd0 Compare September 13, 2022 15:55
@vinibrsl vinibrsl changed the title Send alert e-mails to outgrown enterprise accounts Manually lock outgrown enterprise accounts Sep 13, 2022
@vinibrsl vinibrsl requested a review from a team September 13, 2022 16:01
@vinibrsl vinibrsl marked this pull request as ready for review September 13, 2022 16:01
@vinibrsl vinibrsl force-pushed the enterprise-plan-usage-emails branch 3 times, most recently from c7274b9 to e9b59f9 Compare September 15, 2022 12:23
@vinibrsl vinibrsl added the feature request New feature or request label Sep 15, 2022
Copy link
Contributor

@ukutaht ukutaht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall 👍 Some comments inline

lib/plausible/auth/user_admin.ex Outdated Show resolved Hide resolved
lib/plausible_web/plugs/auth_plug.ex Outdated Show resolved Hide resolved
lib/plausible_web/views/billing_view.ex Outdated Show resolved Hide resolved
mix.exs Show resolved Hide resolved
@ukutaht ukutaht merged commit 40182f6 into master Sep 20, 2022
@ukutaht ukutaht deleted the enterprise-plan-usage-emails branch September 20, 2022 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants