Commit graph

180 commits

Author SHA1 Message Date
Pēteris Caune
1bdfbac775
Fix Sign In page to hide "Email Link" option if SMTP is not configured
Fixes: #922
2024-05-10 11:04:21 +03:00
Pēteris Caune
a567eb23e0
Add a missing closing div tag 2024-04-15 15:33:55 +03:00
moraj-turing
3718ff57c7
Add support for system theme (#987)
Add support for system theme

---------

Co-authored-by: Juan Mora <juan@nimble.gt>
Co-authored-by: Pēteris Caune <cuu508@gmail.com>
2024-04-15 10:42:16 +03:00
Pēteris Caune
decd1d4b87
Improve TOTP auto-submit code
* Listen to "input" event only, don't need "keyup"
* Add form double-submit protection
* Rewrite in plain JS (the page no longer loads jQuery)
2023-11-17 11:00:41 +02:00
Pēteris Caune
daad54aea9
Disable autosubmit in TOTP form as it causes issues in Vivaldi 2023-11-17 10:03:20 +02:00
Pēteris Caune
ee62dc174c
Implement audo-submit in TOTP entry screen. Fixes #905 2023-11-13 15:20:23 +02:00
Pēteris Caune
a9c7dbc397
Remove billing.html which I meant to remove before but missed 2023-10-19 14:44:17 +03:00
Pēteris Caune
26725b9f4e
Add an "Account closed." confirmation message after closing an account 2023-08-24 09:07:41 +03:00
Viktor Szépe
dedb17feb9
Fix JS name and remove references to .map files (#854) 2023-07-02 15:25:04 +03:00
Pēteris Caune
554f6cba68
Replace bootstrap-select with the native <select> element 2023-05-26 13:44:24 +03:00
Pēteris Caune
a5324ac13c
Make warnings about no backup second factor more assertive 2023-04-04 11:53:34 +03:00
Pēteris Caune
bad4b9adbf
Add a "Switch Project" menu in top navigation 2023-03-10 10:36:09 +02:00
Pēteris Caune
1660e8076c
Remove unused bit 2023-01-24 09:06:02 +02:00
Pēteris Caune
359edbd270
Fix login and signup views to make email enumeration harder 2023-01-23 13:05:49 +02:00
Pēteris Caune
188b261000
Improve the "Send test message!" button 2023-01-11 14:50:01 +02:00
Pēteris Caune
18c17fb4b5
Fix project sort order to be case-insensitive everywhere in the UI
Fixes: #768
2022-12-22 11:39:20 +02:00
Pēteris Caune
2f59995601
Tweak wording in the "Register a backup key!" message 2022-12-14 14:42:15 +02:00
Pēteris Caune
ef5df02238
Add max width limit for the timezone select 2022-12-01 16:18:33 +02:00
Pēteris Caune
15cbb39bd3
Change "Settings - Email Reports" page to allow manual tz selection 2022-12-01 16:12:32 +02:00
Pēteris Caune
0ec5117a72
Add autofocus attribute to the TOTP input field
Fixes: #726
2022-11-07 10:33:21 +02:00
Pēteris Caune
0b0a2d993c
Add "btn-remove" CSS class for remove/delete/close buttons 2022-10-07 10:07:22 +03:00
Pēteris Caune
3c43e5aa45
Optimize the spinner animation
Use a CSS box-shadow trick to implement it with just a single
DOM element instead of four.
2022-07-07 10:25:13 +03:00
Pēteris Caune
57021e962c
Refactor webauthn implementation, use webauthn-json 2022-06-19 10:10:57 +03:00
Pēteris Caune
ca392c07ce
Eliminate jQuery usage in the login page 2022-06-08 09:46:51 +03:00
Pēteris Caune
6790d867a6
Add address verification step in the "Change Email" flow
A similar issue has come up multiple times: the user
changes account's email address, enters a bad address
by mistake, and gets locked out of their account.

This commit adds an extra step in the "Change Email" flow:

* In "Account Settings", user clicks on [Change Email]
* User gets a prompt for a 6-digit confirmation code, which
  has been sent to their old address. This is to prevent
  account takeover when Eve sits down at a computer where Alice
  is logged in.
* The user enters the confirmation code, and a "Change Email"
  form loads.
* The user enters their new email address.
* (The new step!) Instead of changing the email right away,
  we send a special login link to user's specified new address.
* (The new step, continued) The user clicks on the login link,
  their account's email address gets updated, and they get
  logged in.

The additional step makes sure the user can receive email
at their new address. If they cannot receive email there,
they cannot complete the "Change Email" procedure.
2022-05-20 17:54:45 +03:00
Pēteris Caune
3f521b16f7
Make email non-editable in "Invite Member" when team limit reached
There is a specific limit of how many other users a given user
can invite in their projects (depends on the plan they are on).
When the limit is reached, the user cannot invite *new* users
in their projects, but they can still invite team members
from one project into another project. In other words, we count
the number of unique invited users, not the number of memberships.

There was an UI bug in the "Invite a Team Member" dialog. The
dialog has an editable "Email" text field. When an user has reached
the team limit, and they open the "Invite" dialog, they could
enter a new user's email address in the Email field and try to invite
them. The server would refuse to exceed the team limit and would
return a plain HTTP 403 page. This is of course confusing to the 
end user.

The fix is to show "Email" as a text field only if the user has
not yet exceeded their team size. If they have, then show "Email"
as non-editable text.
2022-02-04 20:43:17 +02:00
Pēteris Caune
e5ac8d7dbc
Update the "Add TOTP" form to display plaintext TOTP secret
Fixes: #602
2022-01-24 15:17:48 +02:00
Pēteris Caune
cfd0bd2a6e
Change "Add Users from Other Teams" -> "Add Users from Other Projects" 2021-11-03 10:34:56 +02:00
Pēteris Caune
5fe4a60b30
Upgrade to jQuery 3.6.0 2021-10-01 13:12:20 +03:00
Pēteris Caune
66af88145a
Add "if read-write" conditionals for modals in project.html 2021-09-09 15:13:04 +03:00
Pēteris Caune
3dfdbc09ca
Add ability to create/revoke individual keys 2021-09-09 14:55:17 +03:00
Pēteris Caune
5b9008e321
Implement alternative ping URLs, WIP 2021-09-09 09:32:10 +03:00
Pēteris Caune
be641aea96
Add tests for LINE and Trello transports 2021-08-26 15:54:05 +03:00
Pēteris Caune
2c662dac20
Fix HTML validation issues 2021-08-26 12:02:09 +03:00
Pēteris Caune
642d436ae9
Add absolute_site_logo_url template tag
This commit adds a {% absolute_site_logo_url %} template tag.
The tag emits an absolute url pointing to either
SITE_LOGO_URL or to the fallback picture.

The tag is used in base email template, in slack message
template, and in "Add MS Teams" page.

This commit also fixes a couple instances where absolute URLs
were constructed like so:

    {% site_root %}/docs/

This would result in incorrect links if Healthchecks is not
running at webserver's root. The correct way is:

    {% site_root %}{% url 'hc-docs' %}

Finally, this commit removes stuff/logo.svg and
stuff/logo-full.svg. Selfhosted sites should not use the
official Healthchecks.io logos, so no point keeping them around
there.
2021-08-13 14:57:15 +03:00
Pēteris Caune
f85aec225d
Fix redirect-after-login when using TOTP
If user has both WebAuthn and TOTP configured,
when logging in, they will be asked to choose between
"Use security keys" and "Use authenticator app".
The "Use authenticator app" is a link to a different
page (/accounts/login/two_factor/totp/). This commit makes
sure the ?next= query parameter is preserved when navigating
to that page.

For reference, the ?next= query parameter is the URL we should
redirect to after a successful login. Use case:
User is logged out. They click on a bookmarked "Check Details"
link. They get redirected to the login form. After
entering username & password and completing 2FA,
they get redirected to the "Check Details" page they
originally wanted to visit.
2021-08-06 12:09:41 +03:00
Pēteris Caune
ca3afa33f9
Add auth method selection step
This has dual purpose:

* if user has both WebAuthn and TOTP set up, they can choose
  between the two as equal options.
* we initiate WebAuthn flow only after an explicit user action
  (button press). This may help with authentication failures
  on recent MacOS, iOS and iPadOS versions [1]

[1] https://support.yubico.com/hc/en-us/articles/360022004600-No-reaction-when-using-WebAuthn-on-macOS-iOS-and-iPadOS
2021-08-05 16:27:06 +03:00
Pēteris Caune
222722569e
Add support for 2FA using TOTP
Fixes: #354
2021-07-30 16:43:23 +03:00
Pēteris Caune
dfa6f404e6
Improve the "Invite a Team Member" dialog 2021-07-26 15:21:45 +03:00
Pēteris Caune
bbd2786e0f
Optimize queries and fix team member sorting 2021-07-26 14:27:03 +03:00
Pēteris Caune
74427ba3f1
Fix wording in the "Team size limit reached" message 2021-07-26 13:12:06 +03:00
Pēteris Caune
4f83f8c06b
Fix a 403 when transferring a project to a read-only team member 2021-07-26 12:50:43 +03:00
swoga
9640d2242f feat: add manager role 2021-07-26 12:26:06 +03:00
Pēteris Caune
936a5213f8
Switch from Member.rw to Member.role as the source of truth 2021-07-22 17:16:52 +03:00
Pēteris Caune
059a855b3f
Fix more contrast issues 2021-06-18 17:07:27 +03:00
Pēteris Caune
6c10980889
Add Account Settings > Appearance page 2021-06-18 13:51:07 +03:00
Pēteris Caune
6094bca241
Improve wording 2021-05-24 14:13:43 +03:00
Pēteris Caune
df44ee58c0
Add an option for weekly reports (in addition to monthly) 2021-05-24 13:44:34 +03:00
Pēteris Caune
03a538c5e2
Add Profile.reports field
This is in preparation of adding an option for weekly
reports (#407)
2021-05-24 11:20:28 +03:00
Pēteris Caune
e090aa5403
Improve the handling of unknown email addresses in the Sign In form 2021-05-12 13:49:56 +03:00