f0d3ceefa0
Cache import time
...
Also uses a type hint
2022-11-10 12:27:38 -08:00
784dab3d41
Fixes to how import times are estimated
...
The wrong attr was being used to grab the number of seconds, and imports
that were stopped were being counted
2022-11-10 11:42:38 -08:00
9e0867af91
Make the import admin table sortable
2022-11-07 11:32:45 -08:00
817047bdeb
Use stop functionality in import admin view
2022-11-05 15:44:00 -07:00
6792b3d7b8
adds button to stop job
2022-11-05 14:44:09 -07:00
7a36de5ebe
Start and stop jobs from the model
2022-11-05 14:35:27 -07:00
3c2f2c10bf
Show recent imports in a table
2022-11-05 13:12:23 -07:00
4806a6273e
Show average run times for imports
...
This should give users a sense of when to start wondering if their
import isn't running after all.
2022-11-05 12:50:51 -07:00
40e9428b49
Adds more fields to import admin table and ticks version
2022-11-03 11:30:43 -07:00
a8424f61f2
Mark imports as complete
...
This will let the user debug the import, and should only be used when
the import is in a bad state (marked as incomplete but with no pending
tasks)
2022-11-01 19:26:23 -07:00
6eab1fdd6d
Adds import admin view
2022-11-01 19:05:51 -07:00
61c2d2a36a
Use elided page range on user admin view
2022-11-01 18:45:21 -07:00
3d95916b55
handle 2fa user exception properly
2022-10-15 07:47:20 +11:00
32e4f7718e
pylint is being pedantic
2022-10-15 07:47:20 +11:00
cf1fae6af8
return Bad Request if 2fa user does not exist
2022-10-15 07:47:20 +11:00
a1c3f15d80
remove unused import
2022-10-15 07:47:20 +11:00
f3768c3d92
code formatting fix
2022-10-15 07:47:20 +11:00
79b04c2240
various 2fa improvements
...
- cleaner code
- use TWO_FACTOR_LOGIN_MAX_SECONDS instead of hardcoded number
- render qrcode properly
- use nginx to rate limit login attempts
- do not throw error if session user is undefined
2022-10-15 07:47:20 +11:00
9d36722783
code formatting
2022-10-15 07:47:20 +11:00
28329c1781
use string for datetime in session
...
It seemed to work when testing manually, but both pytest and the django documentation indicate that you can't pass datetimes around as session values.
2022-10-15 07:47:20 +11:00
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
5b244f06d6
fix error messages when setting up 2FA
2022-10-15 07:47:20 +11:00
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
9d12b7caff
make pylint stop grumbling
2022-10-15 07:47:20 +11:00
1d13f0ab4f
lint
2022-10-15 07:47:20 +11:00
8837495ffd
redirect login to 2fa check if active
2022-10-15 07:47:20 +11:00
2ec343c5db
new views for capturing user for 2fa check
2022-10-15 07:47:20 +11:00
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
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
3a73ced5fa
Adds a couple tests to annual review views
...
Also I tweaked the save functions so they don't broadcast
2022-09-19 14:38:30 -07:00
fdc477afdf
Merge pull request #2258 from bookwyrm-social/form-perms
...
Check permissions automatically on form save
2022-09-19 13:32:41 -07:00
35aebacf70
Fixes theme form and adds view tests
2022-09-19 13:13:21 -07:00
bf092ec44e
Small fixes
2022-09-19 12:10:27 -07:00
6947f3b787
Uses class method to get list of instance admins
...
Re-writing this query over and over is a bad approach
2022-09-19 10:43:52 -07:00
9d8d85ebc1
Invite perms checks
2022-09-19 10:26:40 -07:00
1e988cae6c
More edit book lines
2022-09-19 10:26:29 -07:00
be480e40f0
Updates links form saves
2022-09-19 10:18:30 -07:00
3fd573c0da
Check perms on site model form
2022-09-19 10:16:38 -07:00
b0d8697006
Adds missing save in edit book view
2022-09-19 10:16:29 -07:00
e51980bc12
Use BookWyrmModel as parent for admin models
...
This will make them more internally consistent and give them built-in
permissions checking
2022-09-19 09:35:38 -07:00
b0236b95bd
Merge branch 'main' into form-perms
2022-09-19 09:32:48 -07:00
d76eae358f
Show queues and runtime instead of start time
2022-09-15 10:53:08 -07:00
3739bdbf81
Better comments
2022-09-15 09:49:58 -07:00
0f55b76a93
Adds celery status view
2022-09-14 18:58:51 -07:00
fcf796abe1
Null state for review view during imports
...
Without this, it will show an empty progress bar and no info about why
the table is empty.
2022-09-14 18:08:16 -07:00
543d13af6e
Removes explicit calls to raise_not_editable from views
...
These raises are handled implicitly in the form, so they don't have to
be called outright.
2022-09-08 11:03:06 -07:00
351292fcda
Catches places where form.save() needs the request
...
Thank you, tests.
2022-09-08 11:02:17 -07:00
1f93dc9c62
Merge pull request #2260 from bookwyrm-social/mentions
...
Refactors how mentions are collected
2022-08-29 15:17:40 -07:00
e782b3f360
Fixes logic that displays search remote or manually add link
2022-08-29 14:03:47 -07:00
22495e40bd
strip spaces from user search
...
Strips leading and trailing spaces from user search to prevent errors when doing webfinger lookup.
Prior to this, webfinger user queries included everything after the second '@' as part of the hostname. This resulted in failed webfinger requests when there was one or more trailing spaces.
Fixes #2205
2022-08-13 15:40:53 +10:00