1
0
Fork 0
Commit graph

1276 commits

Author SHA1 Message Date
df42712b8e
Merge pull request #2449 from bookwyrm-social/empty-csv
Don't start imports with empty CSVs
2022-11-25 12:31:13 -08:00
015af2c1e7 Don't start imports with empty csvs
Fixes #2353
2022-11-25 10:35:16 -08:00
81ab08aaa3 Fixes editing links 2022-11-25 08:28:45 -08:00
Joel Bradshaw
55bab0b70d Slice queryset before we resolve it
This was accidentally querying ALL books in the database to generate
suggestions if we didn't have enough, which broke some stuff
2022-11-23 19:26:09 +00:00
1e5a6ec744
Merge branch 'main' into show-2fa-code 2022-11-19 10:09:27 -08:00
9c5fe7610b Fixes reference to site model 2022-11-17 15:41:30 -08:00
28567e2d8e Disable imports in the UI and view 2022-11-17 15:19:42 -08:00
7c7c0e1a93 Admin UI to enable and disable importing 2022-11-17 14:23:39 -08:00
2dad14bdcf
Merge pull request #2395 from bookwyrm-social/settings-view-perms
Fixes permissions on settings invite request page
2022-11-16 18:33:20 -08:00
a546ab578b Fixes decorator on view method 2022-11-16 18:23:26 -08:00
5a7afe45a2 Fixes permissions on settings invite request page 2022-11-16 18:03:52 -08:00
c29256708a
show otp_secret when setting up 2fa
solves #2389
2022-11-16 20:30:06 +01:00
f95729a0c3 Adds unit test for failing view 2022-11-15 21:45:06 -08:00
317cf5fcf5 Generate fewer add_status_tasks
Previously, every time a status was saved, a task would start to add it
to people's timelines. This meant there were a ton of duplicate tasks
that were potentially heavy to run. Now, the Status model has a "ready"
field which indicates that it's worth updating the timelines. It
defaults to True, which prevents statuses from accidentally not being
added due to ready state.

The ready state is explicitly set to false in the view, which is the
source of most of the noise for that task.
2022-11-15 14:14:32 -08:00
André Jaenisch
530d7de309
Use variable instead of string
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2022-11-13 16:59:05 +01:00
49d0590599 Another tweak to how import wait times are calculated 2022-11-10 13:59:27 -08:00
eae1866992
Allow users to temporarily deactivate their accounts (#2324) 2022-11-10 13:40:54 -08:00
48d4149151 Fixes null state 2022-11-10 12:39:07 -08:00
f80e2465ed Adds tests for recent import average time 2022-11-10 12:29:36 -08:00
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