Commit graph

51 commits

Author SHA1 Message Date
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
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 d94b27b723
Merge branch 'main' into user-migration 2023-11-19 19:18:22 -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
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
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
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
Josh Soref 06fa1adc27 spelling: arbitrary
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-04 20:02:54 -04:00
Mouse Reeve 574c1db732 Adds more templatetag tests 2022-07-06 10:52:45 -07:00
Mouse Reeve 0031a63511 Updates add cover modal 2021-12-30 14:07:30 -08:00
Mouse Reeve 2d875b5575 Add link properties for remotes 2021-12-05 12:29:54 -08:00
Hugh Rundle a9d921cc06
code cleanup 2021-11-22 12:52:59 +11:00
Hugh Rundle fd2ade2313
refactor isni author enrichment
- use activitypub.Author instead of custom dict
- prefer to display "Author of [title]" from ISNI data instead of short description
- merge isni and db authors for edit_book display
- fix edit_book template to use changed data
- rename some functions in utils/isni.py
2021-11-22 08:49:22 +11:00
Hugh Rundle c3ba7ba547 pylint Y U like this? 2021-11-01 20:04:25 +11:00
Hugh Rundle 6556090524 Update existing authors when isni data available
When an existing author is selected as a new author when editing a book,
if they have an ISNI ID recorded we check the record and augment the local
database record from the ISNI data.

Also dedupes author aliases for this feature and when adding a completely
new author.
2021-11-01 19:50:49 +11:00
Hugh Rundle c845b7a5d0 code cleanup 2021-11-01 16:00:34 +11:00
Hugh Rundle 775470a852 normalise isnis
Some isnis are imported with spaces and some not.
This normalises them for comparison and creating URLs
2021-11-01 15:48:52 +11:00
Hugh Rundle 630f508ee4 code cleanup 2021-11-01 11:39:37 +11:00
Hugh Rundle 552980e208 select correct isni record when adding authors
The original implementation of this was so, so broken.
Now it's not.
2021-11-01 11:34:32 +11:00
Hugh Rundle 37148c5127 display isni bio with existing author name
If an existing author has an isni on record and it matches an author from the isni api call,
display the isni short description to aid with identifying the appropriate author.
2021-11-01 10:26:17 +11:00
Mouse Reeve d78c278665 Progress update flow for modal 2021-09-29 10:59:36 -07:00
Mouse Reeve acfb1bb376 Updating string format synatx part 2 2021-09-18 11:32:00 -07:00
Mouse Reeve 79602f69d7 Separate out shelve button options lists 2021-09-09 16:32:21 -07:00
Mouse Reeve 9ee1a110a9 Update visible shelve buttons on read action 2021-09-09 15:36:58 -07:00
Mouse Reeve ccc41deb36 Retain whitespace in split for detecting urls 2021-09-02 13:36:01 -07:00
Mouse Reeve a236163e67 Small cleanup 2021-09-02 09:12:56 -07:00
Joachim bf6ee9f53c
Thumbnails: fix default size definition in template utility 2021-08-20 18:06:09 +02:00
Joachim 489f97030e apply suggested changes 2021-08-18 10:27:17 +02:00
Joachim ce4553b367 Add simple tag to provide fallback if original image doesn't exist 2021-08-03 17:45:52 +02:00
Fabien Basmaison 6be97a6102 Be consistent between variable name & logic. Equal is already too short. 2021-06-09 19:03:15 +02:00
Fabien Basmaison c4072cbc04 Be nice to Black and follow styleguides. 2021-06-09 18:54:05 +02:00
Fabien Basmaison 0ecea5710b Use gettext to add subtitle to short titles (use variable for length). 2021-06-09 18:51:20 +02:00
Fabien Basmaison b9562e44e3 Merge branch 'main' into frontend/subtitle 2021-06-09 10:14:34 +02:00
Joachim 7d1e4aebbc Better forms 2021-06-02 18:17:53 +02:00
Fabien Basmaison c894f5ef35 Update subtitle behaviour:
- on Book
	- Remove problematic punctuation (locale and multiple punctuation if the title ends with `?`, `!` or similar).
	- Update view.
	- Use proper semantic to split combined title into `name`, `alternativeHeadline` and series-related microdata.
	- The author is not a subtitle, just data.
- Use parenthesis in the `get_title` filter instead of punctuation.
2021-05-26 13:21:06 +02:00
Mouse Reeve d64e0c4aa8 Adds admin view for individual announcement 2021-05-20 08:09:35 -07:00