Commit Graph

9236 Commits

Author SHA1 Message Date
evazion
b2ee1f0766 ip bans: add hit counter, deleted flag, new ban type.
* Make IP bans soft deletable.
* Add a hit counter to track how many times an IP ban has blocked someone.
* Add a last hit timestamp to track when the IP ban last blocked someone.
* Add a new type of IP ban, the signup ban. Signup bans restrict new
  signups from editing anything until they've verified their email
  address.
2020-04-06 14:13:22 -05:00
evazion
98e84d83fb Update ruby gems and yarn packages. 2020-04-06 14:13:22 -05:00
evazion
3fea5858b1 user upgrades: update incentive descriptions.
* Call them hidden tags instead of censored tags so that users don't
  think that buying gold removes censorship from images (yes, this happened).

* Remove API ratelimit information (not relevant to most users).
2020-04-06 14:13:21 -05:00
evazion
8773c7e87f Merge pull request #4369 from BrokenEagle/post-version-fixes
Various post version fixes
2020-04-04 02:55:37 -05:00
evazion
844e8703d8 posts: remove tags from thumbnail alt text. 2020-04-04 02:36:24 -05:00
evazion
dda47f15b0 Merge pull request #4350 from BrokenEagle/fix-relationship-previews
Fix relationship preview alt text overflowing
2020-04-04 02:34:03 -05:00
evazion
56ea6b9ec5 Merge pull request #4387 from BrokenEagle/embedded-note-alignment
Add additional settable attributes for embedded notes alignment
2020-04-04 02:20:24 -05:00
evazion
522c8c219f Merge pull request #4373 from BrokenEagle/note-fixes
Various note fixes
2020-04-04 01:17:32 -05:00
evazion
d8f3ea288d Merge pull request #4376 from BrokenEagle/fix-twitter-video-images
Account for additional Twitter video image links
2020-04-04 01:16:03 -05:00
evazion
a8e7dbac5e Merge pull request #4379 from BrokenEagle/fix-revert-views
Fix artist commentary version view
2020-04-04 01:15:19 -05:00
evazion
743b6f0854 Fix #4377: Save commentary by default.
Remove the "Include artist commentary" checkbox. Commentary is included
by default unless the commentary fields are blank.
2020-04-04 00:46:36 -05:00
evazion
c6354b2504 modqueue: add links to flags, appeals, approvals, deletions in subnav. 2020-04-04 00:13:43 -05:00
evazion
8134e92457 user deletions: fix error when given incorrect password.
Use validations instead of raising an exception when the password is
incorrect so that the controller can display errors sensibly.

Also fix users being logged out even when the deletion attempt failed
due to an incorrect password.
2020-04-03 23:44:23 -05:00
evazion
53b761dfe9 user deletions: fix rename conflict logic.
Remove the 10-try limit when there's a name conflict during renaming. We
forgot to increment the loop counter so this did nothing. This wasn't
necessary anyway since the loop will always terminate eventually because
names have finite length.
2020-04-03 23:44:02 -05:00
evazion
300b8bdefc user deletions: add confirmation dialog. 2020-04-03 23:44:02 -05:00
evazion
52dd8385f8 Fix #4383: Save and display deleted usernames for mods+.
Name changes for deleted users are already visible to mods, so the only
thing we need to do here is to generate a name change before the user is
deleted.
2020-04-03 23:44:02 -05:00
evazion
5826b7a61a Fix #4382: Name change should ask for confirmation. 2020-04-03 23:44:02 -05:00
evazion
6b1d73ddae user name changes: fix permission inconsistencies.
* Let moderators see name changes for deleted users on the user name
  change requests index and show pages. Before they could see name changes
  for deleted users on user profiles, but not on the user name changes index.

* Let members see previous names on profile pages. Before they could see
  previous names on the user name changes index, but not on profile pages
  (ref: #4382).
2020-04-03 23:44:02 -05:00
evazion
14c1dc2f0c users/show: fix stray </tbody> tag.
How the fuck has this been broken for 7 years.
2020-04-03 23:44:02 -05:00
evazion
25cca328b2 Fix #4388: Missing newline in upload form error. 2020-04-03 23:44:02 -05:00
evazion
650c5b779e Fix #4385: Prevent custom CSS softlocks.
Use e.g. https://danbooru.donmai.us/settings?css=false to view a page
with custom css disabled.
2020-04-03 23:44:02 -05:00
evazion
d435795b73 posts: add disapproved:<reason> edit metatag.
* Allow tagging a post with a `disapproved:<disinterest|breaks_rules|poor_quality>` to disapprove it.
* Disallow disapproving active posts.

Fixes #4384.
2020-04-03 23:44:02 -05:00
evazion
fde42022c0 post disapprovals: refactor disapproval reasons.
* Factor out reasons into a constant
* Change column default and eliminate unused `legacy` reason.
2020-04-03 23:44:02 -05:00
BrokenEagle
a4ab165de7 Add alignment attributes for embedded notes
- justify-conent is for L-R alignment
- align-items is for T-B alignment
2020-04-04 02:10:33 +00:00
evazion
3e792019e5 comments: link votes page in subnav for mods. 2020-04-03 15:43:01 -05:00
evazion
dc0442bd17 bans: redirect to index page after creating new ban. 2020-04-03 15:39:14 -05:00
evazion
9312e0c78c comment votes: let mods see comment voters. 2020-04-02 20:47:36 -05:00
evazion
e957fccd7f Update ruby gems and yarn packages. 2020-03-31 21:57:34 -05:00
evazion
34337b0eb5 popular posts: fix exception when given blank date param.
Flexbooru calls this endpoint with a blank date param.
2020-03-31 21:57:34 -05:00
evazion
0aa8e16113 posts: fix exception when searching for "-" or "~". 2020-03-31 21:57:34 -05:00
evazion
ab1839c613 uploads: fix exception with preprocessed uploads.
Fix exception when submitting an upload and an in-progress preprocessed
upload already exists. In this case we forgot to pass the upload params
when calling UploadService#delayed_start.
2020-03-31 21:57:34 -05:00
evazion
3051daf5eb password resets: fix exception when given user does not exist. 2020-03-31 21:57:34 -05:00
evazion
25776a062c posts/random: fix pundit exception when no post is found. 2020-03-31 21:57:34 -05:00
evazion
08ce5a71c4 Eliminate various dead code. 2020-03-31 21:57:34 -05:00
evazion
e0a72ef135 tests: add more controller tests.
* Fix an exception in /artists/show_or_new.
2020-03-31 19:00:32 -05:00
evazion
a272453bd0 wikis: redirect legacy title param to show page.
Redirect /wiki_pages?title=touhou to /wiki_pages/touhou.
2020-03-31 18:13:41 -05:00
evazion
81488c7608 controllers: declare search_params helper in app controller. 2020-03-31 18:10:27 -05:00
BrokenEagle
b4094688c2 Fix artist commentary version view
The 100% was causing the table to overflow outside the border on Firefox when
in the revert view because of the thumbnail on the side of the table.
2020-03-31 16:51:51 +00:00
evazion
9def8c5c0d notes: prevent notes appearing above site notices. 2020-03-31 01:23:16 -05:00
evazion
cc385fa9e4 notes: better fix for note body sizing (#4375).
Setting max-width causes notes to overflow the note body if they set a
fixed `width` or they use `white-space: nowrap` and the line is wider
than the max-width. Using `width: min-content` instead makes the note
shrink to fit but doesn't prevent it from expanding if it needs to.
2020-03-31 01:18:23 -05:00
evazion
91e5ed67b7 Remove dead TagCorrection code.
Dead since bc34fb16a.
2020-03-30 12:39:26 -05:00
evazion
4e2fd82ef6 tests: add missing controller tests. 2020-03-30 12:36:06 -05:00
evazion
83c2abf1ae delayed jobs: fix exception on index page. 2020-03-30 12:36:06 -05:00
evazion
353c2e4bae Update ruby gems and yarn packages. 2020-03-29 15:58:04 -05:00
BrokenEagle
a45ae09d72 Account for additional Twitter video image links 2020-03-29 19:27:05 +00:00
evazion
c44267b848 Fix #4375: The popup note boxes are very long 2020-03-29 02:53:50 -05:00
evazion
919a2868be Fix #4374: Unvoting comments is broken. 2020-03-28 21:15:51 -05:00
evazion
c5260f4927 posts: don't cache rendered notes.
Don't cache rendered notes in Redis. Rendering notes shouldn't be
expensive normally.
2020-03-28 18:25:30 -05:00
BrokenEagle
ddb888297e Fix movable status not being removed after the note has been saved
This was also causing the movable status on new notes to require
clicking twice to remove that status since the note ID gets changed
but the move ID wasn't.
2020-03-28 21:08:27 +00:00
BrokenEagle
7358452152 Fix note borders not showing up with the dark theme
- Also remove unnecessary duplicated note variables for dark theme
2020-03-28 21:08:26 +00:00