Commit Graph

263 Commits

Author SHA1 Message Date
Kira
3855d64228 Post replacement system 2021-04-07 10:33:18 -07:00
Kira
814db91046 [Artists] Allow locking artist pages 2021-01-17 11:33:21 -08:00
Kira
ac34b6fe26 Fix bad post_replacement column names 2020-12-20 11:11:35 -08:00
Kira
a37a346817 Update drop post index migration 2020-12-20 10:49:47 -08:00
Kira
db44e102c2 Drop unused post indexes 2020-12-20 10:33:21 -08:00
Kira
01abcf5762 [Posts] Log destroyed post information 2020-11-13 00:35:33 -08:00
Kira
436d2aea38 [Ruby 3] Fix up some deprecations involving ruby 3
Still pending are gems that make poor choices and need to be removed,
replaced, or fixed up.

Memoist
ActiveModelSerializers
2020-11-11 21:06:12 -08:00
Kira
c35d272d1e Updated encode settings
Save space, save time, make it clear it's a sample
2020-10-17 22:35:28 -07:00
Kira
804903c67d [BUR] Improve some bur error reporting 2020-07-12 22:53:02 -07:00
Kira
621df484f5 Clean up dead db tables 2020-01-12 18:41:07 -08:00
Kira
15923af4ba Add janitor selectable background color per image 2019-12-31 10:19:11 -08:00
Kira
32f0266481 Add wiki edit reason 2019-11-15 20:00:54 -08:00
Kira
df2c76226b Add link to artist note changes to history 2019-10-13 16:47:48 -07:00
Kira
f8b339b3b0 Add reason to post versions 2019-10-06 07:34:29 -07:00
Kira
d378887d25 Add tag relationship reason 2019-10-06 00:59:19 -07:00
Kira
fa4a51d81b Add tag alias undo support 2019-10-03 06:26:25 -07:00
Kira
5a133e1643 Add lore tag category 2019-09-24 17:04:46 -07:00
Kira
e074080ade Potentially fix vote cheating 2019-09-19 14:41:55 -07:00
Kira
bb9e30dc74 Remove user inviter system 2019-09-16 13:50:47 -07:00
Kira
6127ea6d25 Initial comment hide vs delete distinction 2019-09-06 07:01:37 -07:00
Kira
532e2c1e04 Update to rails 6 2019-08-28 21:50:40 -07:00
Kira
834d837572 Minor fixes for sets pages. 2019-08-28 19:03:39 -07:00
Kira
4fe2e02fa4 Make user_id column unique on user_statuses 2019-08-27 15:44:23 -07:00
Kira
41e1a1a0f7 Add change_seq support 2019-08-15 07:34:11 -07:00
Kira
9721705b64 Add permabans, for those special individuals that need them 2019-08-10 00:22:34 -07:00
Kira
1861441100 Add post status below post on index pages 2019-08-03 19:00:58 -07:00
Kira
1d09ff5440 Clarify flags from deletions in the deletion/flag log 2019-08-01 14:49:58 -07:00
Kira
e0f1d69ead Allow turning off throttles during testing 2019-07-19 03:48:16 -07:00
Kira
4fb3c9fedb Add some cheap exception logging until something better is made 2019-07-17 14:40:03 -07:00
Kira
7b750ac862 Descriptions on posts 2019-07-14 06:24:52 -07:00
Kira
0715b0c251 Add species and invalid tag types 2019-06-23 00:27:33 -07:00
Kira
583cd7e20d Make password resets closer to old e6 password resets 2019-06-12 21:39:45 -07:00
Kira
d21e36073b Remove cached counters from user model and update references 2019-06-04 11:51:23 -07:00
Kira
621148b097 Update more stuff to go in the user status table. 2019-06-04 05:56:20 -07:00
Kira
05e4736bb5 User different table for cached counters
This does not make the required changes to redirect to these
new properties yet.
2019-06-02 07:49:38 -07:00
Kira
7aaa36282d Fix bad migration of pool versions 2019-05-21 22:39:08 -07:00
Kira
5d8494caac Replace post archive service with inline code 2019-05-10 16:08:08 -07:00
Kira
25f8222d2c Add avatar to user class
This also updates the supporting code to enable dumping deferred
post information to the page, which was partially broken in a
previous commit.
2019-04-30 06:50:43 -07:00
Kira
128428f879 Add user profile info
Possible improvements:
 - Lock commission information to users linked to artists.
   (Currently not implemented.)
2019-04-28 06:59:29 -07:00
Kira
06db14aceb Add simple versioning replacement
This replaces the old simple versioning helper that existed on
e621. The implementaiton is roughly the same but has been updated
to use newer rails methods.

No, it's not very flexible, but it didn't need to be.
2019-04-27 11:28:02 -07:00
Kira
8698bd4e39 Support for access locked forum categories 2019-04-21 20:32:11 -07:00
Kira
4673523607 Update storage of mod actions to json for potential search abilities 2019-04-14 02:34:04 -07:00
Kira
779f30b6bd Preliminary mod action decorator and structure 2019-04-14 02:30:01 -07:00
Kira
86adf1eea4 Add fix up post disapproval things after revert 2019-04-11 23:46:34 -04:00
Kira
44ab7b1a8c Comment votes and vote fixups and interface 2019-04-09 13:04:40 -07:00
Kira
d9f5dcd4ce Tag type restrictions and history 2019-04-03 18:56:47 -07:00
Kira
99f8e9addd Moved favs/voting out into managers to consolidate logic
While the logic was not particularly complex or spread out it was
made more complicated by the models being dependant on one another.

This creates a central entry point for voting and favorites and
coordinates all transactions.

TODO: upvote/downvote/fav metatags in tag section result in an error
because they attempt to change the transaction isolation mode during
an outer transaction.
2019-03-31 13:25:55 -07:00
Kira
45394916d8 Sets 2019-03-23 00:40:44 -07:00
Kira
b5db278311 Test and bring tickets closer to completion
Add links to report items to all of the reportable areas of the
site.

Fix a lot of errors surrounding views and bad expectations from
the old codebase.

Change how dmails can be viewed to match the old logic. This prevents
users from creating links to their own dmails that can be shared with
moderators, and instead forces them to be reported.

Sets are still not implemented, so the reporting area for them has
not been tested or revised. That will happen at a later phase when
sets go in.
2019-03-14 19:10:33 -07:00
Kira
6f1d47c10b Add ticket infrastructure. 2019-03-13 14:04:59 -07:00
Kira
bc1218044c Blips 2019-03-01 08:44:29 -08:00
Kira
118459af1b Takedowns 2019-02-23 08:45:10 -08:00
Kira
8126c9ef52 Remove post disapprovals table
Also fix a dumb mistake with approvals.
2019-02-19 20:44:45 -08:00
Liam P. White
47d1e4fc20 Coalesce favorites tables 2019-02-19 22:39:57 -05:00
Kira
43cad3f5e7 Remove post banning functionality
The distinction between file deletion and banning is pretty weird
and there are a bunch of edge cases that make this not worth
trying to maintain a distinction.

Left in the automatic implication code on banned artists because
it looked useful for automating some of the basic tasks that are
done surrounding DNP artists.
2019-02-14 01:44:54 -08:00
Kira
e42cf5ec1e Update SQL structure 2019-02-13 20:08:20 -08:00
Albert Yi
a15b13567d db structure update 2019-01-28 17:28:11 -08:00
evazion
80f43f9a7c Fix #4038: Attempting to create an IP-ban bans the creator.
* Rename comments.ip_addr to comments.creator_ip_addr.
* Fix belongs_to_creator to not clobber ip_addr field.
2019-01-09 16:20:34 -06:00
evazion
f00641b3ac Fix #3998: Some artist histories throw exceptions. 2018-12-02 11:45:57 -06:00
Albert Yi
fe612908cd add creator_ip_addr field to user feedback 2018-11-29 16:51:46 -08:00
Albert Yi
60cee5f452
Merge pull request #3989 from evazion/fix-3987
Wiki pages: convert other_names column to array (#3987)
2018-11-19 16:23:32 -08:00
evazion
41ff05c121 artists: convert other_names to array (#3987). 2018-11-15 14:31:16 -06:00
Albert Yi
0508b127fd continue refactoring savedsearch 2018-11-15 12:06:13 -08:00
evazion
741462ae68 artist versions: convert other_names, url_string to arrays (#3987). 2018-11-14 14:25:02 -06:00
evazion
fe2698a011 tag implications: convert descendant_names to array (#3987). 2018-11-14 12:51:18 -06:00
evazion
308a5021b4 wiki pages: convert other_names to array (#3987). 2018-11-13 19:18:11 -06:00
evazion
fb7d83c54f pools: drop post_count column (fix #3667) 2018-11-08 15:35:41 -06:00
evazion
115ed16a96 pools: store post_ids as array instead of string (fix #3979) 2018-11-08 15:09:31 -06:00
r888888888
192ac128cd add additional meta tags for seo 2018-10-20 17:15:29 -07:00
evazion
4a84ec9e26 artist urls: add trigram indexes on urls. 2018-09-15 19:58:55 -05:00
Albert Yi
7c6ef9f22c Revert "Revert "add prefix index on tags (#3858)""
This reverts commit 6210c1554c.
2018-09-13 11:44:07 -07:00
Albert Yi
6210c1554c Revert "add prefix index on tags (#3858)"
This reverts commit 8c564f055f.
2018-09-12 16:41:52 -07:00
Albert Yi
8c564f055f add prefix index on tags (#3858) 2018-09-12 14:01:21 -07:00
Albert Yi
762dc3da24 Refactor sources 2018-08-24 12:10:51 -07:00
r888888888
334d8b7c6f Add alt_source field on uploads to deal with twitter galleries 2018-08-04 16:32:15 -07:00
Albert Yi
fcd80b6043 Artist urls can be prepended with a '-' to mark is inactive (#3388) 2018-05-16 16:04:05 -07:00
Albert Yi
b0a3f574ed fixes #3574 2018-04-25 14:31:11 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
r888888888
3657cacd17 * post keeper is calculated synchronously
* add fallback mechanism in case archive service is not up
* pass along most recently added tags to any keeper calculation
2018-03-08 16:00:44 -08:00
BrokenEagle
3c45273694
Add category for mod actions 2018-01-13 20:55:52 -08:00
evazion
89b523bdae Fix #3480: NoMethodError error when adding artist tag to post. 2017-12-30 16:07:52 -06:00
Albert Yi
7af5b133c4
Merge branch 'master' into feat-public-favgroups 2017-12-19 15:42:56 -08:00
BrokenEagle
5a602c60eb
Added option to make favorite groups public 2017-12-18 17:30:02 -08:00
evazion
eede2f0752 Fix #3324: Incorporate replacement comment info in the replacement history. 2017-12-18 18:02:43 -06:00
evazion
dd8e3bbb94 tags: add trigram index on tag names. 2017-11-27 15:21:19 -06:00
BrokenEagle
7cb45fc8d3 Added fifth tag category meta 2017-11-07 10:58:42 -08:00
r888888888
c2029b62b5 delayedjob fixes 2017-10-10 15:49:34 -07:00
r888888888
b944b642b8 akismet integration 2017-09-14 13:37:36 -07:00
evazion
f3b0a0a9e9 Remove unused KeyValue model (#3206). 2017-07-09 14:30:44 -05:00
evazion
1aafdc3928 commentaries: migrate columns to non-null. 2017-06-13 16:42:29 -05:00
Type-kun
6947f39136 Synchronize db/structure.sql with migrations (missed in #3006) 2017-06-11 19:17:51 +05:00
evazion
ec9a3e5c17 posts: add partial indexes on is_pending, is_flagged. 2017-06-08 00:00:38 -05:00
evazion
8f98e8e03c posts: redefine source column to be non-NULL (fixes #3090). 2017-05-26 13:54:17 -05:00
evazion
fad4d48b1c search: fix order:note, order:comment_bumped to use indexes. 2017-05-19 18:19:05 -05:00
evazion
a8c1b0bc62 structure.sql: add forum topics (is_sticky, updated_at) index. 2017-05-19 18:19:04 -05:00
r888888888
78b08d8394 add new model for post replacements, add undo functionality 2017-05-12 17:11:40 -07:00
evazion
b48671f59f saved searches: drop unused name and category columns. 2017-04-28 17:22:25 -05:00
r888888888
b053a2d783 add source + rewrite strategy for pawoo 2017-04-20 15:50:22 -07:00
evazion
9816676bfd structure.sql: remove bank_balances, bank_transactions. 2017-04-19 17:08:28 -05:00
evazion
fb0a8e8600 db: add reason index on post_flags, post_appeals. 2017-04-16 21:15:23 -05:00