Commit graph

928 commits

Author SHA1 Message Date
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 35aebacf70 Fixes theme form and adds view tests 2022-09-19 13:13:21 -07:00
Mouse Reeve 37dacaff6f Fixes creating notifications for auto-moderation reports 2022-09-19 11:11:08 -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 9d8d85ebc1 Invite perms checks 2022-09-19 10:26:40 -07:00
Mouse Reeve 3fd573c0da Check perms on site model form 2022-09-19 10:16:38 -07:00
Mouse Reeve 330be16516 Adds permissions checking for admin models 2022-09-19 10:12:47 -07:00
Mouse Reeve 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
Mouse Reeve b0236b95bd Merge branch 'main' into form-perms 2022-09-19 09:32:48 -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 aa67f23b03 Override raise_not_editable for report model
This model uses "reporter" as the field that represents the onwer of the
object, and "user" and the subject. In retrospect, maybe not the ideal
way to do it.
2022-09-19 09:20:44 -07:00
Hugh Rundle 0ad3dc6245 allow 0.5 star ratings 2022-09-10 07:24:11 +10: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
Mouse Reeve 639b727c92 Fixes perms check for ratings 2022-07-17 16:21:43 -07:00
Hugh Rundle 17dc5e7eb1 Merge branch 'main' into tour
- we need to do this because of conflicting migrations
2022-07-17 16:30:45 +10:00
Mouse Reeve 235e877b3d Reverse order of notification users lists
Should show newest first
2022-07-14 11:00:05 -07:00
Mouse Reeve f92b4548b1 Fixes get_or_create error when multiple matching notifications exist 2022-07-09 12:30:05 -07:00
Hugh Rundle ab5e4128e6 Merge branch 'main' into tour
Also fixes conflict
2022-07-09 20:54:48 +10:00
Hugh Rundle 3365bb6d35 show_guided_tour is not added to AP serialisation 2022-07-09 10:17:10 +10:00
Mouse Reeve a972c58f3b Fixes errors in permissions 2022-07-07 14:01:51 -07:00
Mouse Reeve 742d97b177 Python formatting 2022-07-07 12:23:10 -07:00
Mouse Reeve 76c466ee45 Fixes cache invalidation for editions
Your reading status is shown across all editions of a work, so when you
change your status in relation to the edition you're currently reading,
it needs to invalidate the cached values for all editions of that work.
2022-07-07 12:21:24 -07:00
Mouse Reeve 26a1f75e91 Group notification types by feature 2022-07-06 19:15:48 -07:00
Mouse Reeve 5a6ef7ccd8 Merge branch 'main' into notifications 2022-07-06 14:41:15 -07:00
Mouse Reeve 4f386e8c4e Allow reports with no associated user 2022-07-05 17:19:03 -07:00
Mouse Reeve 7fe722b595 Fixes follow request notifications
Since the main way to interact with them is by approving them in the
notification, I didn't group them
2022-07-05 15:04:14 -07:00
Mouse Reeve e54c563865 Consistent use of plurals 2022-07-05 14:49:04 -07:00
Mouse Reeve 8cbf8f62c7 List add notifications 2022-07-05 14:15:12 -07:00
Mouse Reeve 41f42e33ed Moves list add notification into notification model
Right now notifications are a mix of post-save signals and clauses in
the save function of the model. I'm not actually sure which is better,
but I'm moving them to signals where it's straightforward to be
consistent.
2022-07-05 13:28:09 -07:00
Mouse Reeve 736d29ea20 Updates group leave and remove notifications 2022-07-05 13:05:28 -07:00
Mouse Reeve 971bed9942 Notification field is read, not unread
Oops
2022-07-04 21:32:35 -07:00
Mouse Reeve 801ba03aaf Keep group as a foreign key field 2022-07-04 20:32:13 -07:00
Mouse Reeve 9948dd2356 Use enums in more models 2022-07-04 20:27:56 -07:00
Mouse Reeve aeefd5a3e9 Use signal for creating group invite notification 2022-07-04 20:24:29 -07:00
Mouse Reeve 03f5a3f2c1 Use enums for notification types 2022-07-04 20:19:18 -07:00
Mouse Reeve 72a8229a5c Updates group notifications 2022-07-04 20:05:39 -07:00
Mouse Reeve b193652a67 Python formatting 2022-07-04 19:58:27 -07:00
Mouse Reeve dc8e61f316 Updates reports created in automod task 2022-07-04 19:57:58 -07:00
Mouse Reeve 62e57ac931 Adds notify and unnotify helper class methods
In the new paradigm, a notification related to a status has users added
to it and removed from it, rather than a new notification being added
every time. These helper functions make this behavior consistent.
2022-07-04 19:48:10 -07:00
Mouse Reeve a9a2da0957 Keep status as a single field 2022-07-04 19:20:04 -07:00
Mouse Reeve a718a168a3 Merge branch 'main' into notifications 2022-07-04 17:38:21 -07:00
Mouse Reeve 7f78140015 Uses library for html cleanup 2022-07-04 13:21:13 -07:00
Hugh Rundle 0e9dc66ffa Merge branch 'main' into tour
Merging in latest changes from main, since I got covid and missed a few weeks.
2022-07-03 16:18:50 +10:00
Mouse Reeve e16506c1df Fixes logic error in checking relationships
I had the logic backwards for pending relationships.
2022-07-02 21:25:07 -07:00
Mouse Reeve 3ad0a5d073 Use update_fields to limit remove_list_tasks
If we know what fields were updated, we can avoid running this task.
This also adds some mocks where they are needed for the list view.
2022-07-02 13:23:23 -07:00
Mouse Reeve cbb979242d
Revert "Use async requests for broadcasting" 2022-07-02 10:56:18 -07:00
Mouse Reeve be76fe1494
Merge pull request #2143 from bookwyrm-social/async_broadcast
Use async requests for broadcasting
2022-07-02 10:23:02 -07:00