analytics/lib/plausible_web/templates/site
Adrian Gruntkowski e67850c11d
Fix and refactor invitation logic (#3376)
* Make membership creation and role updates more explicit in terms of changesets

* Extract invitation accept flow logic and refactor it slightly

* Improve acceptation logic

* Update moduledoc

* Improve SiteLocker API and add typespecs

* Stop naming function not returning a boolean like a predicate

* Refactor rest of invitation actions and safeguard against rogue requests

* Update code docs slightly

* Extend `Billing.check_needs_update/1` tests

* Parametrize selfhost flag and toggle SiteLocker logic on it

* Add tests for newly extracted services

* Add test case and a fix for locking site on grace period ended

* Make invitation controller tests async as there's no more env patching

* Add test cases for self-invites and fix one bug

* Add and refactor tests for rejecting and removing invitations

* Prevent issuing ownership transfer to existing owner

* Improve name of the test

* Improve `Billing.check_needs_to_upgrade/1` return value

* Improve `Billing.SiteLocker.update_sites_for/1` and its tests

* Fix typos

Co-authored-by: hq1 <hq@mtod.org>

* Make invitation removal and rejection resilient to races

---------

Co-authored-by: hq1 <hq@mtod.org>
2023-10-02 14:57:57 +02:00
..
membership Add a note that a subscription is not transferred alongside a site (#2750) 2023-03-15 08:17:07 -03:00
change_domain.html.heex Adding a note about WordPress plugin (#3358) 2023-09-21 12:55:56 +02:00
edit_shared_link.html.eex Add unique index to shared link name 2021-04-14 11:45:45 +03:00
import_from_google_confirm.html.eex Refresh Google Analytics token before import (#2254) 2022-09-26 12:29:56 +03:00
import_from_google_user_metric_form.html.eex Refresh Google Analytics token before import (#2254) 2022-09-26 12:29:56 +03:00
import_from_google_view_id_form.html.eex Handle GA authentication errors (#2505) 2022-12-07 23:32:14 -03:00
index.html.eex Fix and refactor invitation logic (#3376) 2023-10-02 14:57:57 +02:00
new_shared_link.html.eex Optimize dark mode UI for shared link form (#2355) 2022-10-19 09:02:27 -03:00
new.html.eex Revert "Temporarily disable site creation (#2813)" (#2817) 2023-04-04 08:23:31 +02:00
settings_custom_domain.html.eex Update links to documents 2022-08-15 09:20:40 +08:00
settings_danger_zone.html.eex Apply unified capitalization to buttons and titles (#3321) 2023-09-05 09:43:01 -03:00
settings_email_reports.html.eex Apply unified capitalization to buttons and titles (#3321) 2023-09-05 09:43:01 -03:00
settings_funnels.html.heex Implement better user password validation (#3344) 2023-09-25 10:27:29 +02:00
settings_general.html.eex Update Tailwind to latest v3.3.3 (#3320) 2023-09-07 11:23:19 -03:00
settings_goals.html.heex Apply unified capitalization to buttons and titles (#3321) 2023-09-05 09:43:01 -03:00
settings_people.html.eex Update Tailwind to latest v3.3.3 (#3320) 2023-09-07 11:23:19 -03:00
settings_props.html.heex Open docs links in new window (#3360) 2023-09-20 11:50:50 +02:00
settings_search_console.html.eex Open docs links in new window (#3360) 2023-09-20 11:50:50 +02:00
settings_visibility.html.eex Apply unified capitalization to buttons and titles (#3321) 2023-09-05 09:43:01 -03:00
snippet_after_domain_change.html.eex Upgrade phoenix (#2902) 2023-05-09 11:51:35 +03:00
snippet.html.heex Adding a note about WordPress plugin (#3358) 2023-09-21 12:55:56 +02:00