Commit graph

215 commits

Author SHA1 Message Date
Bart Schuurmans
acae063652 Fix new warnings from pylint upgrade 2024-04-26 13:59:16 +02:00
Bart Schuurmans
3aefbb548e Allow serving BookWyrm on a non-standard port 2024-04-24 15:30:47 +02:00
Adeodato Simó
a6dc5bd13f
Make get_file_size robust against typing errors 2024-03-18 15:03:07 -03:00
Adeodato Simó
518da3b9cf Merge from main into 'user-export'
Conflicts:
	bookwyrm/models/bookwyrm_export_job.py
	requirements.txt
2024-03-18 14:47:34 -03:00
Hugh Rundle
2c231acebe
linting and tests 2024-01-28 20:35:47 +11:00
Hugh Rundle
2bb9a85591
various fixes
- use signed url for s3 downloads
- re-arrange tar.gz file to match original
- delete all working files after tarring
- import from s3 export

TODO

- check local export and import
- fix error when avatar missing
- deal with multiple s3 storage options (e.g. Azure)
2024-01-28 15:07:55 +11:00
Hugh Rundle
ddc35a7a52
fix multiple issues from user exports config changes
- improve nginx config
- fix DATA_UPLOAD_MAX_MEMORY_SIZE default not being an int
- translate fallback value in id_to_username template tag
- make location of setting to turn on user exports easier to locate for admins

fixes #3227
fixes #3231
fixes #3232
fixes #3236
2024-01-20 13:19:13 +11:00
Hugh Rundle
469172947b
cleanup and linting 2024-01-18 18:43:45 +11:00
Hugh Rundle
833f26fd0e
Merge branch 'main' into user-export 2024-01-18 18:24:56 +11:00
Hugh Rundle
b990d9ccd8
Pass correct user id in Move notification
We were passing the *requesting* user's moved_to value to the Move notification template, instead of the id of the user that they are being notified about.
Additionally, the id_to_username template tag had no fallback for if the user_id is None.

This resolves both problems and removes an unnecessary space in a template for when the logged in user made the move.

Fixes #3196
2024-01-17 21:06:04 +11:00
Hugh Rundle
cbd08127ef
initial work on fixing user exports with s3
- custom storages
- tar.gz within bucket using s3_tar
- slightly changes export directory structure
- major problems still outstanding re delivering s3 files to end users
2024-01-14 12:14:44 +11:00
Mouse Reeve
fb16806afe
Merge pull request #3177 from dato/naturalday_partial_fixes
Adjustments to naturalday_partial
2024-01-01 19:16:16 -08:00
Adeodato Simó
4711b3bc19
naturalday_partial: simplify/refactor 2024-01-01 18:36:31 +01:00
Adeodato Simó
0d908b594c
naturalday_partial: do not naturalize dates with missing parts 2024-01-01 18:36:31 +01:00
Adeodato Simó
0e3936cb61
naturalday_partial: do naturalize date and datetime objects 2024-01-01 18:36:30 +01:00
Hugh Rundle
72c1c6ee3d
merge migrations and lint 2023-11-22 21:29:54 +11:00
Hugh Rundle
0276c15948
Merge branch 'main' into user-migration 2023-11-22 21:00:04 +11:00
Mouse Reeve
b022b5a1b7
Merge pull request #3120 from hughrun/permission-required
403 handler
2023-11-20 10:06:24 -08:00
Mouse Reeve
d94b27b723
Merge branch 'main' into user-migration 2023-11-19 19:18:22 -08:00
Mouse Reeve
3d9f339bd5
Merge pull request #3059 from dato/stable_dates_v2
Partial, stable dates with automatic precision field
2023-11-19 19:17:49 -08:00
Mouse Reeve
1d5cc83347
Merge branch 'main' into permission-required 2023-11-19 19:12:32 -08:00
Hugh Rundle
f011f2bce9
hide instance actor from users
The Instance Actor is required for signing http GET requests but is not a "user" and should not be otherwise interacted with.

- hides instance actor profile page, returning a 404
- excludes instance actor from search results and suggestions including in Getting Started
- replaces link to user profile in user admin page with a brief message box
- replaces panel in user admin page that allows for user to be suspended or removed with a message explaining why that is a very bad idea

fixes #3119
2023-11-20 12:17:52 +11:00
Adeodato Simó
6aaff28c13
Accept argument in naturalday_partial, downcast format if necessary 2023-11-19 15:10:14 -03:00
Hugh Rundle
a56ba0ce1c
always return 403 to POST requests
- POST requests need to receive a 403 error code
- minor wording updates
2023-11-18 13:41:52 +11:00
Hugh Rundle
d620bd7350
add handler for 403s
fixes #3104
2023-11-18 12:36:03 +11:00
Adeodato Simó
edfa6b18a1
Rename utils.sealed_date module (and tests) to utils.partial_date 2023-11-09 14:00:44 -03:00
Adeodato Simó
fa80aa54a9
SealedDate renames, pt. 2
• SealedDate -> PartialDate
• MonthSeal  -> MonthParts
• YearSeal   -> YearParts
2023-11-09 14:00:44 -03:00
Adeodato Simó
c120fa8c87
Rename: templatetags/{sealed_dates => date_ext}.py 2023-11-09 14:00:44 -03:00
Adeodato Simó
e928027e16
Merge from main for up-to-date migrations 2023-11-09 14:00:14 -03:00
Hugh Rundle
282f7dd8d6
show filesize on user downloads page
- add column to user download page to display filesize
- adds a filter to display file sizes
- don't download the user downloads page from notifications ;)
2023-11-07 11:04:11 +11:00
Adeodato Simó
170d1fe205
fix pylint issues (minus no-else-return) 2023-10-24 17:41:07 -03:00
Adeodato Simó
777c8b4549
naturalday_partial filter for working with SealedDate 2023-10-24 04:32:27 -03:00
Hugh Rundle
3e38fecd55
id_to_username cleanup 2023-09-26 07:45:45 +10:00
Hugh Rundle
b05f2e99e8
undo moves
also cleans up some templates
2023-09-25 22:05:43 +10:00
Hugh Rundle
5b051631ec
Move MVP
* update User model to allow for moved_to and also_known_as values
* allow users to add aliases (also_known_as) in UI
* allow users to move account to another one (moved_to)
* redirect webfinger to the new account after a move
* present notification to followers inviting to follow at new account

Note: unlike Mastodon we're not running any unfollow/autofollow action here: users can decide for themselves
This makes undoing moves easier.

TODO

There is still a bug with incoming Moves, at least from Mastodon.
This seems to be something to do with Update activities (rather than Move, strictly).
2023-09-18 21:21:04 +10:00
Mouse Reeve
fbb9d75cc8 Avoid server error when encountering broken edition
If an edition is missing its work, this change allows the page to still
load without a server error; this is important because otherwise the
book will break every page it appears on, including the feed page.
2023-07-17 07:07:01 -07:00
Jascha Ezra Urbach
fadbc76aaa
Merge pull request #2789 from bpeel/translatable-shelf-name
Fix two places where the reading status shelf name wasn’t translated
2023-04-15 16:59:59 +02:00
Neil Roberts
9092c9c80c Add a translatable name for the "stopped-reading" status shelf 2023-04-06 16:03:35 +02:00
Neil Roberts
b0f90d05f2 Move the shelf names to a dict instead of a chain of if statements
The main reason to do this is that if we try to add another name then
pylint will complain that there are too many return statements. It might
be slightly faster too.

If I understand correctly it doesn’t matter that the _ function is being
called at module load time because it is mapped to gettext_lazy so the
actual translation will be done when the string is used.
2023-04-06 16:02:24 +02:00
Josh Soref
18fcea35da spelling: should
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
764bc0c204 spelling: produce
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
d2d087dcb7 spelling: identifiername
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Josh Soref
06fa1adc27 spelling: arbitrary
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Andy Maloney
89c1edac36 Improve Open Graph data for books and add it for lists 2023-01-18 10:30:26 -05:00
Mouse Reeve
e94e72a594 Python formatting 2022-11-25 10:40:06 -08:00
Mouse Reeve
becc90d485 Show review counts in search results
Fixes #2317
2022-11-25 10:06:51 -08:00
Mouse Reeve
6dd671ae5a Fixes user follow cache 2022-11-17 11:23:48 -08:00
Mouse Reeve
553f170f89 Only show editions with the author on the author page 2022-11-01 18:04:27 -07:00
Mouse Reeve
d76eae358f Show queues and runtime instead of start time 2022-09-15 10:53:08 -07:00
Mouse Reeve
0f55b76a93 Adds celery status view 2022-09-14 18:58:51 -07:00