* Enable exceptions when revoking all user sessions
* Add `User` changeset for changing password
* Make button in `2fa_input` component optional
* Implement password change from User Settings
* Add tests
* Fix 2FA modal cancel button formatting
* Update changelog
* Don't pass redundant params to `render_settings` and clean up code a bit
* Render one error per field in password reset form
* Refactor inline form 2FA validation
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Update generic components library
* Import generic components via `PlausibleWeb`
* Update Settings/Danger Zone
* Update new shared link template and convert to heex
* Update site settings layout
* Update site settings sidebar tab layout
* Update Settings/Email Reports
* Update Funnels
* Update ComboBox
* Extend/update form components
* Update Modal live component
* Update Settings/Goals
* Update Shields
* Update Settings/Props
* Update Settings/Import & Export
* Update flow progress
* Import Routes in settings
* Update Billing components
* Update Billing notice component
* Update feature toggle component
* Update 2fa component
* Update verification markup
* Update installation
* Update Settings/Integrations/Plugins
* Update domain change markup
* Update Settings/General
* Update Settings/Integrations
* Update Settings/People
* Update Settings/Integrations/GSC
* Update Settings/Visiblity
* ukuwip
* ukuwip
* Tables & paddings
* Imports exports
* Brighten disabled input text color for dark mode
* Tune down table border/divider in dark mode
* Format
* Fix goal list on mobile
* Fix IP Shields table on mobile
* Fix country shields list on mobile
* Fix country shield list on mobile
* Fix page shields list on mobile
* Fix import/export settings on mobile
* Fix combobox dropdown background in dark mode
* Fix filter bar search input on mobile
* Revert @ukutaht's changes to goal list
* Maybe maybe maybe
* Revert the current prod goal list + fix mobile issues
* Format
* Revert tests change
cc @ukutaht
* Fix markup expectation in a test
* Set autocomplete="off" again
* Bring back `text-sm` where previously removed
---------
Co-authored-by: Uku Taht <uku.taht@gmail.com>
* add experimental pageleave script variant
* also send pageleave events on SPA navigation
* disallow goals with 'pageleave' event name
* do not count pageleaves towards the event metric
* remove duplication in test file
* do not update sessions on pageleave events
* ignore pageleaves in the current time_on_page implementation
* make pageleave events not billable
* rename function
* Prevent multiple pageleaves being sent at the same time
* Implement listing user sessions in user settings
* Make copy adjustments (h/t @metmarkosaric)
* Make warning button text color more consistent across user settings
* Add tests for `UserAuth.revoke_user_session/2`
* Test and improve `Auth.UserSessions`
* Test and improve controller actions
* Update CHANGELOG.md
* Stop typescript command clearing previous server start output in dev
* Allow auth site access plug to specify that domain is found in request body at some key
* Fix init order
* Make domain retrieval part of the role pipeline
* Add tests
* Refactor how is_binary is applied in get_domain/2
* Make plug tests rely on dedicated test routes for more stability
* Consistently treat empty `allowed_roles` list as permitting all roles
* Fix async test param, add extra case for init
* Make `DocsQueryTest` async again
* Improve a bit and document plug configuration
* Make docs more legible when viewed from source directly
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Check usage for users with active/cancelled/past due subscriptions
So that over limit e-mails and grace period is handled
regardless - they're still subscribers.
* Ensure current subscription is fetched, for an ongoing plan
* Add extra test
* Revert "Ensure current subscription is fetched, for an ongoing plan"
This reverts commit 9ddc7bdccb.
* Fixup test
* Reapply "Ensure current subscription is fetched, for an ongoing plan"
This reverts commit 7ab537954b.
* Do a subscription preload and assert ID match
* Use inner lateral join to fetch subscriptions
* Refactor and fix `AuthorizeSiteAccess` plug shared link case handling
* Make plug module name more consistent
* Add moduledoc
* Add regression test for shared link auth case
* Adjust failing case test to account for different response
* Further restrict accepted input and configuration
* Extend plug-specific tests
* Tag EE-only test properly
* Remove one DB roundtrip from AuthorizeSiteAccess
* Improve naming slightly
* Filter shared link by site ID on query level already
---------
Co-authored-by: Uku Taht <uku.taht@gmail.com>
Building Dockerfile seems to be failing now with the following error:
```
Dockerfile:72
--------------------
70 | && if [ "$MIX_ENV" = "ce" ]; then apk add --no-cache certbot; fi
71 |
72 | >>> COPY --from=buildcontainer --chmod=a+rX /app/_build/${MIX_ENV}/rel/plausible /app
73 | COPY --chmod=755 ./rel/docker-entrypoint.sh /entrypoint.sh
74 |
--------------------
ERROR: failed to solve: invalid chmod parameter: 'a+rX'. it should be octal string and between 0 and 07777
```
Link: https://github.com/plausible/analytics/actions/runs/10898788870/job/30242872415
Not sure _why_ given this line hasn't changed in ages, but perhaps
something to do with buildx changes. If preview deploy succeeds in this,
it should fix the issue.
* Remove support for legacy user sessions
* Implement revoking all sessions for a given user
* Revoke all user sessions on password reset
* Add tests for revoking all user sessions on password reset
* Reload page when dashboard API request fails with 404
* Revert "Reload page when dashboard API request fails with 404"
This reverts commit 77d1a1035658915f9afe538afc5fb9a3da0ec905.
* Update to the copy
Update to the copy to include a note about billable pageviews. hopefully it doesn't make the copy too long...
* Don't show tooltip on small/mobile screens
---------
Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
* Drop event explicitly on session lock timeout
* Make session `user_id` more random in tests to avoid excess locking
* Improve testability to event ingestion
* Test lock timeout in ingestion
* APIv2: Make imports_skip_reason flag not appear when imports not requested
* Update lib/plausible/stats/query_result.ex
Co-authored-by: hq1 <hq@mtod.org>
---------
Co-authored-by: hq1 <hq@mtod.org>
`persist_session/1` is used in `populate_native_stats/1` test helper
to merge session data. It sometimes gets `:ok` instead of the actual
session data so that tests randomly fail with:
```
** (BadMapError) expected a map, got: :ok
code: populate_stats(site, [build(:pageview)])
stacktrace:
(elixir 1.17.1) lib/map.ex:486: Map.take/2
(plausible 0.0.1) lib/plausible/clickhouse_event_v2.ex:92: Plausible.ClickhouseEventV2.merge_session/2
(plausible 0.0.1) test/support/test_utils.ex:188: anonymous fn/2 in Plausible.TestUtils.populate_native_stats/1
(elixir 1.17.1) lib/enum.ex:2531: Enum."-reduce/3-lists^foldl/2-0-"/3
(plausible 0.0.1) test/support/test_utils.ex:184: Plausible.TestUtils.populate_native_stats/1
(plausible 0.0.1) test/support/test_utils.ex:179: Plausible.TestUtils.populate_stats/1
test/workers/send_site_setup_emails_test.exs:46: (test)
```
Offset-based pagination is used to make sure Looker integration
is able to work as efficiently as possible. To know how many
requests users need to do `include.total_rows` option was added.
* On the dashboard, allow Metrics (aka column configurations) to
* specify width they need
* specify if they are sortable
* Default sort order for breakdown endpoints is hardcoded on the dashboard (needed to show what column the report is sorted by)
* Unifies Google Keywords modal with other breakdowns