Commit graph

32 commits

Author SHA1 Message Date
Hugh Rundle 9b74c26742 backup codes
- add hotp_secret to user model
- view to create backup codes in user prefs
- check backup code if otp doesn't work
- increment hotp count if used
- show correct errors if code wrong
2022-10-15 07:47:20 +11:00
Hugh Rundle 6db4fb39ed improve security and fix error msg
- Instead of passing the user as a hidden form element, we use a session variable.
- Introduces a 60 second limit on completing the login, and an exponentially increasing delay to attempt to login with 2FA if the code is entered incorrectly.
- use proper Django form error when incorrect otp value entered
2022-10-15 07:47:20 +11:00
Hugh Rundle 9d12b7caff make pylint stop grumbling 2022-10-15 07:47:20 +11:00
Hugh Rundle 0e1751eb57 prep for 2fa login check
- new 2fa checker page to be inserted between initial login and completion of login
- new views and forms for above
2022-10-15 07:47:20 +11:00
Hugh Rundle 54daade9f9 prepare for 2FA
- add and migrate User fields for 2FA
- add views for 2FA
- add new forms for 2FA
- update package list in requirements.txt
- add URLs for 2FA views
2022-10-15 07:47:20 +11:00
Mouse Reeve b06c35b7dd
Update forms.py 2022-10-14 12:06:54 -07:00
Laura Pircalaboiu f97b6f3da2 fix pylint complaint 2022-10-12 11:25:03 +02:00
Laura Pircalaboiu 4ab5e4b5d9 re-format code 2022-10-11 14:40:52 +02:00
Laura Pircalaboiu b895fbd8f2 fix bug, can no longer finish a book in the future 2022-10-11 14:40:45 +02:00
Laura Pircalaboiu aeeb2c3442 WIP: fix reading status ending in the future 2022-10-11 14:40:32 +02:00
Mouse Reeve 7d61cb55bc Ignore pylint complaints about argument counts to form saves 2022-09-19 13:23:18 -07:00
Mouse Reeve 330be16516 Adds permissions checking for admin models 2022-09-19 10:12:47 -07:00
Mouse Reeve 8f79b362f8 Check permissions automatically on form save 2022-08-05 09:56:32 -07:00
Mouse Reeve 3846b201bd Updates reset password flow to use validators 2022-07-15 11:39:18 -07:00
Mouse Reeve 659ee96002 Use password validation in change password flow
This also moves the form validation into a form instead of doing it in
the view.
2022-07-15 10:51:58 -07:00
Mouse Reeve 4a65ee326a Use password validation in register view 2022-07-15 09:59:57 -07:00
Mouse Reeve e2a50230c7 Fixes setting acces level to "user"
This wasn't working because "user" isn't a group, it's the absense of
any group.
2022-07-04 21:44:55 -07:00
Mouse Reeve 375c5a8789 Adds stopped date separate from finish date on readthrough 2022-05-26 11:36:37 -07:00
Mouse Reeve 45672c2b70 Adds missing widgets file 2022-03-19 09:04:50 -07:00
Mouse Reeve a701bfcf8e Uses custom date select widget for publication dates 2022-03-19 08:45:10 -07:00
Mouse Reeve 287b5603d6 Fixes progress updates 2022-03-18 19:11:58 -07:00
Mouse Reeve 2047365d31
Merge pull request #1973 from bookwyrm-social/add-edition
Create another edition for existing work
2022-03-17 08:51:13 -07:00
Mouse Reeve 0101d2561a Python formatting 2022-03-17 08:18:44 -07:00
Mouse Reeve a684d86d15 Fixes subjects in add edition view 2022-03-17 08:02:59 -07:00
Mouse Reeve 7b3b357756 Merge branch 'main' into form-conflict 2022-03-16 16:51:57 -07:00
Mouse Reeve 68dc5962ee Merge branch 'main' into add-edition 2022-03-16 16:16:55 -07:00
Mouse Reeve 81b7dca4b9 Merge branch 'main' into celerybeat 2022-03-14 15:13:09 -07:00
Mouse Reeve a37f83c458 Get the field working 2022-03-14 14:55:41 -07:00
Mouse Reeve 716e357060 Use plus icon on add field button 2022-03-14 12:54:50 -07:00
Mouse Reeve 19202e2cd7 Fixes name of user forms file 2022-03-14 12:12:51 -07:00
Mouse Reeve d3f723a07d Splits forms into separate files 2022-03-14 12:06:50 -07:00
Mouse Reeve 7169f7ba20 Creates forms directory 2022-03-14 11:43:58 -07:00