Commit graph

184 commits

Author SHA1 Message Date
Bart Schuurmans 464a0298c6 Add index for finding active (and local) users 2024-04-03 21:27:52 +02:00
Bart Schuurmans 0501ce39cd Add index for looking up User by username 2024-04-03 21:15:24 +02:00
Bart Schuurmans 4d5a30d953 Add index for looking up KeyPair by remote id 2024-04-03 21:11:27 +02:00
Mouse Reeve 381490e31d Adds management command to clear all deleted user data 2024-01-02 10:50:46 -08:00
Mouse Reeve ee6e3ed7eb Adds a database field for is_deleted on user 2023-11-05 20:28:23 -08:00
Mouse Reeve 27d99a0094 Removes failsafe that was overzealous 2023-11-05 19:47:32 -08:00
Mouse Reeve d3668e413d Removes updates fields that was causing problems 2023-11-05 09:59:49 -08:00
Mouse Reeve f353b49d36 Another linting issues 2023-11-05 09:53:57 -08:00
Mouse Reeve 4de9907456 Adds migration tests 2023-11-05 09:26:49 -08:00
Mouse Reeve 61caeed5a3 Adds migration and more tests 2023-11-05 08:51:42 -08:00
Mouse Reeve 93a7dd9cf3 Erase user data and statuses on account deletion 2023-11-05 08:00:29 -08:00
Hugh Rundle c95f160216
fix MoveUser errors and clean up
- minor template fixes
- notification logic fixes
- don't dedupe on moved_to or also_known_as
- add migration
2023-09-25 15:14:21 +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 c4d72829e9
Merge pull request #2879 from bookwyrm-social/reactivation-bug
Don't allow invalid account reactivation
2023-07-20 19:07:18 -07:00
Wesley Aptekar-Cassels 3e78e398c0 Switch from priority queues to function-based queues
Fixes: #2907
2023-07-20 12:25:30 -04:00
Mouse Reeve 6a949c24e2 Typo fix 2023-06-21 15:52:32 -07:00
Mouse Reeve 11f1a4662e Don't allow invalid account reactivation 2023-06-21 15:47:20 -07:00
Mouse Reeve bfb29c0d74 Set remote servers synchonously where possible 2023-05-07 09:24:45 -07:00
Wesley Aptekar-Cassels 1048638e30 Stop ignoring task results
This is essentially a revert of 9cbff312a. The commit was at the advice
of the Celery docs for optimization, but I've since decided that the
downsides in terms of making things harder to debug (it makes Flower
nearly useless, for instance) are bigger than the upsides in performance
gain (which seem extremely small in practice, given how long our tasks
take, and the number of tasks we have).
2023-04-07 21:51:44 -04:00
Wesley Aptekar-Cassels 9cbff312a5 Ignore Celery task results
Since we don't use the results of our Celery tasks (all of them return
None implicitly), it's prudent to set the ignore_result flag, for a
potential performance improvement. See the Celery docs for details [1].

We could do this with the global CELERY_IGNORE_RESULT setting, but it
offers more flexibility if we want to use task results in the future to
set it on a per-task basis.

[1]: https://docs.celeryq.dev/en/stable/userguide/tasks.html#ignore-results-you-don-t-want
2023-03-08 02:12:13 -05:00
Christof Dorner 7ae983acdf Use default user auth group from site settings 2023-01-21 17:04:32 +01:00
Joachim a44f427d84 Add remote user test before the task is called 2022-12-19 22:26:09 +01:00
Jascha Urbach 0744bd5385
delete avatar when user is deleted 2022-12-15 23:01:56 +01:00
Mouse Reeve 50a42dc0a2 Use user.reactivate when a user confirms their email address
This is cleaner and easier to maintain.
2022-12-11 11:44:04 -08:00
Mouse Reeve b1c6781036 Fixes collecting list of admins 2022-11-17 14:38:05 -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
Mouse Reeve eae1866992
Allow users to temporarily deactivate their accounts (#2324) 2022-11-10 13:40:54 -08:00
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 514762c233 fix typo in new user fields
oopsie
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 fdc477afdf
Merge pull request #2258 from bookwyrm-social/form-perms
Check permissions automatically on form save
2022-09-19 13:32:41 -07:00
Mouse Reeve 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
Mouse Reeve 3f5eb6c682 Adds raise_not_editable to User model
This model doens't inherit from BookwyrmModel for various reasons, but
it still needs to editability check.
2022-09-19 09:26:01 -07:00
Mouse Reeve 844023f104
Merge pull request #2246 from bookwyrm-social/goal-model
Moves annual goal to its own file
2022-07-29 13:22:12 -07:00
Mouse Reeve 2298a478cf Moves annual goal to its own file
The user model file is just,, very long
2022-07-29 13:00:59 -07:00
Mouse Reeve ed20587695
Merge pull request #2168 from hughrun/tour
Add guided tour / walkthrough
2022-07-28 11:08:49 -07:00
Mouse Reeve f3bc7d759f Only show pending follow requests from active users 2022-07-24 12:26:58 -07:00
Hugh Rundle 3365bb6d35 show_guided_tour is not added to AP serialisation 2022-07-09 10:17:10 +10:00
Hugh Rundle 80c71928c3 add show_guided_tour value to User
This boolean value indicates whether the user wishes to be show the guided tour.
It defaults to True but will be able to be easily set to False.
2022-06-13 13:07:48 +10:00
Mouse Reeve 34a4c18397
Merge branch 'main' into partially-read-shelf 2022-03-05 19:23:35 -08:00
Mouse Reeve f4dc07b6b9 Select theme in context processors 2022-03-01 09:53:02 -08:00
Mouse Reeve 043fd54d70
Merge branch 'main' into themes 2022-02-28 13:27:05 -08:00
Mouse Reeve e1ea847441
Merge pull request #1986 from bookwyrm-social/instance-refresh
Instance refresh
2022-02-28 13:26:22 -08:00
Mouse Reeve 81cfcff939 Reload instance data 2022-02-28 13:11:01 -08:00
Mouse Reeve e90cb52f23 Add option to hide follows 2022-02-28 11:48:49 -08:00
Mouse Reeve 8850b68b52 Show theme options 2022-02-27 10:48:33 -08:00
Mouse Reeve 3dfbb3272e Theme selector 2022-02-27 10:00:50 -08:00
Mouse Reeve 43269429ac Use selected theme 2022-02-26 13:40:06 -08:00
Thomas Versteeg c88b34814f Rename 'Partially Read' to 'Stopped Reading' 2022-02-12 19:49:54 +01:00
Thomas Versteeg 2b27889457 Add 'Partially Read' shelf 2022-02-11 14:33:46 +01:00