Earlopain
a5f5543e85
[Tests] Remove unused fixture files
2023-09-07 16:41:20 +02:00
Donovan Daniels
115c140cc2
[Posts] Make comment_disabled not hide comments ( #546 )
...
* [Posts] Make comment_disabled not hide comments
* [VoteManager] Disallow voting on locked/disabled comments
* [Comments] Disable editing/hiding disabled & locked comments
* Tweaking
* Allow hiding when comments locked
* Don't allow mods to vote when comments locked
* Change wording from disabled to locked everywhere
---------
Co-authored-by: Earlopain <14981592+Earlopain@users.noreply.github.com>
2023-09-05 17:27:05 +02:00
Earlopain
c51029ea1e
[ModActions] Stop logging name changes
...
These are not mod actions, anybody can do that. Only log when admins
force change names.
Don't show old/new names, we already don't show that on user profiles.
2023-09-04 23:02:14 +02:00
Earlopain
177558b5d5
[TagQuery] Use consistent naming for tag fields
2023-09-03 15:23:27 +02:00
Earlopain
b2c7b338c0
[TagQuery] Improve description search
...
These all works:
* description:test
* description:"multiple words followed by each other"
* description:"multiple words followed by each oth*"
2023-09-03 15:12:40 +02:00
Earlopain
be75cf3349
[QueryBuilder] Fix searching by tag counts
2023-08-31 08:57:47 +02:00
Earlopain
8b133570c0
Merge pull request #543 from e621ng/search-improvements
...
Search improvements
2023-08-29 18:54:42 +02:00
Earlopain
b65741456f
[QueryBuilder] Move count validation into the query class
2023-08-24 13:43:01 +02:00
Earlopain
c8d7bebd72
[QueryBuilder] Move parsing code into own class
...
Introduces the concept of "free" tags to account for automatically added tags.
Introduce `resolve_aliases` which can be used instead of `raw_tag_match`
2023-08-24 13:16:44 +02:00
Earlopain
9848c18ace
[QueryBuilder] Move value parsing into separate module
...
Also add some tests
2023-08-23 14:18:51 +02:00
Earlopain
1621e6e110
[QueryBuilder] Rename range parsing methods for clarity
...
Also replace a bit of the regex matching with more explicit code.
2023-08-22 23:23:08 +02:00
Earlopain
b7b9a8c400
[Users] Remove the contributor rank
...
We don't use that anymore. Next one up is former staff, so the checks
look a bit goofy now.
2023-08-21 21:24:31 +02:00
Earlopain
f193e159eb
[QueryBuilder] Introduce methods to handle common search actions
2023-08-19 18:37:15 +02:00
Earlopain
d579c845f3
[Cleanup] Remove duplicate tag query scan method
2023-08-19 11:20:00 +02:00
Earlopain
b4a7a5ba3d
[Cleanup] Remove unused tag methods
2023-08-18 23:08:42 +02:00
Earlopain
c9a084e0a3
[Tags] Take category id instead of name for related search
...
Also have the bulk response return something with more structure to it
2023-08-18 22:40:06 +02:00
Earlopain
36eb87b084
[Cleanup] Move tag data outside of config file
...
Most of that is not easily configurable and requires db fields, css classes etc.
Everything in TagCategory was also pretty much incomprehensible for me
thanks to the indirection, so I moved it all inline instead.
I'll clean that up in later commits.
2023-08-18 19:08:52 +02:00
Earlopain
3aecc36b3e
[Users] Fix exception when refreshing counts
2023-08-15 14:13:58 +02:00
Earlopain
d6bfa02694
[Replacements] Fix approving when hitting the upload limit
...
Also improves the error message that was being returned because
just saying 'pending' isn't really helpful
2023-08-11 17:39:33 +02:00
Earlopain
3f03182dfb
[Cleanup] Remove a test-only method
2023-08-11 17:30:43 +02:00
Earlopain
e6d3fabc2a
[Posts] Don't unflag if approving on the show page
...
My previous commit on the matter says that this was intented behaviour
and always like that but it's just unexpected
2023-08-07 20:23:13 +02:00
Earlopain
2ce42c49e3
[Users] Add replacements to the hourly upload limit
2023-08-05 12:29:38 +02:00
Earlopain
42abd4ca33
[UserRevert] Fix error when user has uploaded a post
...
Extended version of #530
Co-authored-by: Donovan Daniels <hewwo@yiff.rocks>
2023-08-01 18:20:39 +02:00
Earlopain
52bc715a28
[Posts] Add edit reason when reverting/undoing a version
2023-08-01 17:24:14 +02:00
Earlopain
66c66af58c
[Users] Fix switching names not updating the cache correctly
...
Regressed in7df64409d6
update_cache was not updated to normalize the username
2023-07-31 23:14:39 +02:00
Earlopain
12e996dc08
[Tags] Fix category for non-existant tags
...
Regressed in 4cd32c5f87
Caching nil as a category can cause problems in a bunch of places
2023-07-31 21:36:20 +02:00
Earlopain
eb7033dbc2
[Artists] Fix reverting removing urls when validations fail
2023-06-18 16:13:08 +02:00
Earlopain
e154c70e6c
Merge pull request #527 from faucetlol2/e
...
[Tags] Disallow é in tag names
2023-06-13 22:00:01 +02:00
Earlopain
1dfd0bdbad
[Tests] Fix wiki page revert after previous commit
...
Yet another CurrentUser issue
2023-06-11 12:48:00 +02:00
faucet
cbe809fed5
[Tags] Disallow é in tag names
2023-06-10 17:46:04 +01:00
Earlopain
d8c0a83fb4
[Tests] Suppress sidekiq redis log message
2023-06-08 20:39:14 +02:00
Earlopain
7ba84504b5
[Users] Better fix for setting ip on login for banned users
2023-06-08 13:11:54 +02:00
Earlopain
86c28ef180
[Users] Don't update last ip on session create
...
This updates the ip of banned users which is undesirable.
The initialization in the user class interferes with tests and
is not actually needed. The controller already does this.
2023-06-06 20:12:02 +02:00
Earlopain
f5f29f8673
[Tests] Remove workaround for bcrypt slowdown
...
81a1b4b544
says this was done to make tests significantly faster, I'm
not seeing any slowdown with this change though. The real culprit was
probably the MX lookups.
2023-06-06 19:52:02 +02:00
Earlopain
33bab9e9f0
[Artists] Fix autocomplete
...
I removed the _like parameter in 40dd24f387
but missed this usage
2023-06-05 17:04:47 +02:00
Earlopain
1c42ce1464
[Cleanup] Use a consistent method signature for search
...
The name parameter for the user search is unused.
2023-06-02 16:15:17 +02:00
Earlopain
300866fe94
[Dmails] Add option to not send email notifications
2023-06-02 16:04:49 +02:00
Earlopain
40dd24f387
[Cleanup] Remove search_text_attribute
...
* Undocumented
* Some don't work because of strong params
Some of the possible attributes seem like they would be
useful but I would rather introduce them properly and
with more thought behind it
2023-06-01 21:45:51 +02:00
Earlopain
9035f845ee
[Search] Fix sequential prev/next buttons
...
Apparently this broke with the upgrade to rails 7, see cae6599631
The overwritten records method is at fault.
Added some tests to confirm that both elastic and active record
return the correct result to prevent breakage in the future.
2023-05-29 20:12:14 +02:00
Earlopain
05b100f8da
[Cleanup] Remove Cache.hash
...
Rails already handles long keys for us
2023-05-19 22:14:34 +02:00
Earlopain
6841fe3b7e
[Cleanup] Remove dead code around post query counting
2023-05-19 20:43:59 +02:00
Earlopain
44485e90fd
[Misc] Show a better error message when not authorized
...
This previously just showed that an unexpected error occured which
isn't very helpful.
See #509
2023-05-07 15:00:26 +02:00
Earlopain
b58865149f
[IQDB] Remove xhr handling
2023-05-07 14:03:57 +02:00
Earlopain
8fe5cb986b
[Tests] Add zeitwerk compliance check
...
Because I'm stupid
2023-05-01 17:30:13 +02:00
Earlopain
b48de755fc
[Admin] Fix unable to edit users with duplicate emails
...
Also fixes a mistake in showing the email edit box
2023-04-30 13:10:43 +02:00
Earlopain
9ae9fa51c0
[Posts] Fix uploading of urls with square brackets
...
Mostly encountered on furaffinity.
Since this is now also a problem for iqdb I though why not try a fix
2023-04-24 21:24:48 +02:00
Earlopain
e87d617c6f
[IQDB] Switch to new implementation
2023-04-24 14:46:26 +02:00
Earlopain
01b5f7dd14
[IQDB] Add integration for the new iqdb server
...
Use param v2=1 to use it, for now
2023-04-17 22:36:29 +02:00
Earlopain
75fb29240f
Merge pull request #501 from e621ng/dtext-changes
...
Dtext changes
2023-04-10 20:55:02 +02:00
Earlopain
aef5840425
[Posts] Fix locked notice always showing on edit with dnp tags
...
Closes #462
2023-04-10 20:08:36 +02:00
Earlopain
e301842224
[Tickets] Add option to send update dmail
...
Also create a ModAction when just the response is changed
2023-04-10 14:27:26 +02:00
Earlopain
aca5543f3c
[UserFeedback] Add option to send dmail on update
2023-04-10 12:51:03 +02:00
Earlopain
6eeacde1da
[Gems] Bump DText
...
This imports 3 years of commits from Danbooru. See #487
2023-04-09 15:50:43 +02:00
Earlopain
9a97e02b20
[Tags] Import the external autocomplete service
...
This has been used in production for a while already, and now I
bothered to put it up here
2023-04-06 19:03:51 +02:00
Earlopain
580776ca81
[Comments] Remove quoted response
2023-04-03 00:10:28 +02:00
Earlopain
da798a0b41
[Tests] Fix tag change permission check
...
Forgot that in 36712c7872
2023-03-29 18:47:06 +02:00
Earlopain
18e809937f
[ModActions] Fix artist rename/unlink
...
Also removes the unsed wiki_page_undelete action
Part of #488
2023-03-23 20:14:17 +01:00
Earlopain
de3f7d6a6e
[Tests] Fix random failures
...
Sometimes the seconds tick over to the next one during execution,
resulting in failures. This should be the end of that.
2023-02-27 13:00:28 +01:00
Earlopain
49275af9b0
[Tests] Remove usage of rand
...
Makes them more deterministic
2023-02-26 14:58:08 +01:00
Earlopain
0dada96f38
[BURs] Add tests for mass_update blacklist updating and nuking
...
Also simplifies the logic by doing the same thing aliases are doing
2023-02-26 11:58:30 +01:00
Earlopain
996f1c30c1
[Tests] Remove/Disable remaining failing tests
2023-02-25 00:15:08 +01:00
Earlopain
6a530993bc
[Artists] Fix wiki page renaming on alias approval
...
It was trying to set the body to nil since @notes wasn't set.
2023-02-25 00:03:32 +01:00
Earlopain
9d1d195fa2
[Cleanup] Remove a bunch of code around is_single_tag?
...
That method will never return true because status:deleted is getting appended.
Also remove a bunch of related_tags code.
It was either calculate_related_tags_from_post_set or related_tags_for_group.
The results from calculate_related_tags_from_post_set look good in every case,
I can't tell one over the other. This one should be more efficient, since
it doesn't have to do an extra post search.
2023-02-24 23:26:07 +01:00
Earlopain
02a4051031
[Tests] Be explitic about where jobs need to be inlined
2023-02-24 14:14:44 +01:00
Earlopain
5215876862
[DB] Remove usage of dedicated index columns
...
The index for posts is also getting added, but will get used at a later date
If this turns out to work fine the materialized index colums can be dropped
This contains a semantic change where dmail and wiki page searches for the body
no longer includes matches for the title
2023-02-19 20:01:54 +01:00
Earlopain
902e35673f
[Posts] Relax voting isolation level and remove lock
...
"The serialization of the vote and favorite actions was likely excessive
even in the production configuration, and it has been relaxed to use
repeatable_read in this implementation. The locks on rows were also
removed as they do not have strict locking requirements with this transaction
level to my knowledge."
2023-01-28 15:37:20 +01:00
Earlopain
690750d020
[Posts] Allow guidelines flag in more cases for priv+
2023-01-27 22:25:48 +01:00
Earlopain
ead6d0919e
[PostFlags] Remove test reason
2023-01-26 21:44:00 +01:00
Earlopain
f6b53dd0d3
Merge branch 'moderator-role'
2023-01-11 17:05:37 +01:00
Earlopain
af13018639
[Cleanup] Remove tag "Mass Update"
...
Make a BUR instead.
2022-12-27 22:02:42 +01:00
Earlopain
76f54e32b9
[BURs] Remove another unused import parameter
...
Was only possible to set to false on the previously removed import page.
2022-12-26 20:36:53 +01:00
Earlopain
e3b02a7f96
[BURs] Rename importer class
2022-12-26 20:21:33 +01:00
Earlopain
f08a094ea2
[BURs] Remove unused first parameter for import
2022-12-26 20:09:32 +01:00
Earlopain
b6f006a353
[Cleanup] Remove forum topic merging
2022-12-23 16:58:32 +01:00
Earlopain
1a94acb6f6
[Users] Moderator permission tweaks
2022-12-23 16:35:37 +01:00
Earlopain
1dfa7b7c09
Merge remote-tracking branch 'origin/master' into moderator-role
2022-12-20 15:28:42 +01:00
Earlopain
e262f06a93
[Cleanup] Remove NoteSanizier
...
Notes are formatted using dtext only. Even though the existance of this
class suggests that some html elements are allowed, it doesn't actually do anything.
Link relativization also didn't work, same with dtext colors.
2022-12-17 17:00:27 +01:00
Earlopain
cb3d34b650
[Cleanup] Use the same method names for Cache as Rails
2022-11-29 19:14:09 +01:00
Earlopain
665f432e17
[Users] Allow moderators to handle tickets
2022-11-28 16:21:40 +01:00
Earlopain
731fc5a42f
[Users] Style usernames by default
...
This only takes effect when logged out and for newly created accounts.
2022-11-27 17:44:03 +01:00
Earlopain
7a028cf003
[Tests] Set CurrentUser.ip_addr in base setup
2022-11-26 16:20:16 +01:00
Earlopain
c4dfc5b52e
[Tests] Remove user.as_current
2022-11-26 15:25:27 +01:00
Earlopain
c68fdfce2b
[Tests] Always use CurrentUser as helper
2022-11-26 15:20:15 +01:00
Earlopain
20ef412b68
[Cleanup] Remove CurrentUser.root_url
2022-11-26 14:43:43 +01:00
Earlopain
98e55562eb
[Tests] Clean up teardowns
2022-11-26 14:02:06 +01:00
Earlopain
918a3f491d
[Tests] Remove useless travel_to
2022-11-26 13:52:37 +01:00
Earlopain
b6fb6d3ee6
[Tests] Remove as_user helper
2022-11-26 12:49:35 +01:00
Earlopain
e0819dfd5f
[Tests] Remove as_admin helper
2022-11-26 12:37:22 +01:00
Earlopain
87313c437c
[Tests] Include FactoryBot::Syntax::Methods
...
The newly included create method behaves exacly like the self-written one,
with the added benefit of it not appearing in backtraces.
2022-11-25 21:06:54 +01:00
Earlopain
5e8989d3df
[Tests] Fix duplicate setup/teardown for IntegrationTest
...
Everything inherits from ActiveSupport::TestCase. Because of that
you can also simply add the global helpers to the class directly.
2022-11-25 20:15:48 +01:00
Earlopain
b690177f07
[Tests] Remove useless stub
2022-11-25 20:09:24 +01:00
Earlopain
a34c2217b6
[Tests] Use factory_bot_rails and clean up test_helper requires
2022-11-25 19:56:14 +01:00
Earlopain
00c1dc27e1
[Tests] Use file_fixture/fixture_file_upload
2022-11-25 18:44:36 +01:00
Earlopain
04b18d0852
[Tests] Disallow and stub all requests being made
...
Make CloudflareService a module for easier stubbing
2022-11-25 17:27:38 +01:00
Earlopain
55d020877f
[Tests] Replace FFaker with FactoryBot sequences
2022-11-25 14:33:02 +01:00
Earlopain
c9f65608de
[Tests] Replace timecop with native Rails method
...
Also removes it at a bunch of places where it's not needed
2022-11-25 14:32:56 +01:00
Earlopain
982568a603
[Users] Fix unexpected error on creation with duplicate name
...
find_by_name is not the same as find_by(name:), it is overwritten in the model class.
Luckily there was still a db constraint preventing the name, which is
why the error was raised.
2022-10-20 18:07:16 +02:00
Earlopain
6214cbd16e
[Cleanup] Remove more pool post set code
2022-10-19 18:15:00 +02:00
Earlopain
e4cfa55f35
[Users] Fix admins not being able to edit when email is blank
2022-10-16 15:03:16 +02:00
Earlopain
27371dfc84
Merge pull request #440 from zwagoth/votes
...
Votes
2022-10-13 21:44:03 +02:00
Earlopain
c2adf1bf31
[Users] Reset account level on deletion
2022-10-13 18:37:52 +02:00
Earlopain
e7b155cb85
[Cleanup] Remove where_regex
...
Only artist_url matching was using this.
2022-10-13 18:22:07 +02:00
Earlopain
7816c8562e
[Users] Fix exception on users?name=non_existant_name
...
Just redirect to the show page unconditionally, it handles it already
2022-10-13 15:36:56 +02:00
Earlopain
696ae62ef6
[Votes] Deduplicate Comment/Post vote code
2022-10-08 12:04:17 +02:00
Earlopain
33dba98cf5
[Cleanup] Simplify/Remove some post set code
2022-09-30 14:23:54 +02:00
Earlopain
999e410665
[Tests] A bunch of fixes, again
2022-10-01 19:11:46 +02:00
Earlopain
8a6fb57cc2
[Tests] Remove note_count
2022-10-01 19:11:40 +02:00
Earlopain
668c1baccb
[Tests] Fix a few failing ones because of pr #430
2022-09-28 19:00:26 +02:00
Earlopain
6801742487
[Cleanup] Remove promote message code
2022-09-26 20:20:20 +02:00
Earlopain
a6f79a6a2d
Merge branch 'master' into ticket-cleanup
2022-09-25 14:16:02 +02:00
Earlopain
3fe4b718cc
[Posts] Prevent adding specific tags when base tag is locked
...
Closes #399
2022-09-24 20:43:49 +02:00
Earlopain
9089290eb5
[Tests] Fix not reloading post to update is_flagged
2022-09-24 20:43:48 +02:00
Earlopain
12d32bb1fb
[Tickets] Add tests and fix found issues
2022-09-21 21:17:29 +02:00
Kira
fb1fb87047
[Posts] When approving your own uploads, don't increment approval count
...
This brings the behavior of approvals on your own uploads in line with uploading
with the automatic approvals enabled.
2022-09-20 02:13:00 -07:00
Kira
d56334ea4c
[Posts] Prevent automatic flag removal when approving posts
...
In order to prevent mistakes where posts are approved from the index page
flags are no longer automatically resolved on approval.
This does not modify the approval behavior of clearing flags from the post
page itself, where the action is explicitly performed by jan+.
2022-09-20 02:08:45 -07:00
Earlopain
e1e9324c84
[Tests] A few fixes
2022-09-17 19:32:21 +02:00
Earlopain
978afa5138
[Misc] Return 406 for 404 requests with invalid format
2022-09-17 17:17:29 +02:00
Earlopain
34bece584c
[Posts] Simplify tag list generation
...
There were a bunch of parameters being passed around, now there aren't.
Also gave the methods more descriptive names.
2022-09-17 13:18:33 +02:00
Earlopain
94e3dac343
[TagAliases] Don't change category of the target tag when non-general on approve
2022-09-16 19:22:28 +02:00
Earlopain
eb5d001b55
[Posts] Remove the modqueue
...
Truly the end of an era. This page was trash and nobody was using it.
This will make it easier to make changes to the approval flow people actually use.
2022-09-13 16:14:00 +02:00
Earlopain
a46da28840
[ForumPosts] Fix being able to respond in hidden topic
...
Also remove some unused logic regarding forum post creation
2022-09-12 20:07:18 +02:00
Earlopain
0cd5391d3c
[Users] Fix double dot in account to new message
2022-09-11 18:54:43 +02:00
Earlopain
b78d55fdd3
[Posts] Add new flag reason for pending posts
2022-08-20 18:19:08 +02:00
Earlopain
77fe1ef42b
[Replacements] Fully use vue for creating new replacement
2022-08-20 17:13:36 +02:00
Earlopain
0a03bea16c
Merge branch 'master' into pools-is-deleted
2022-08-07 16:29:47 +02:00
Earlopain
4cb88300c7
[Versions] Rename post/pool archive classes to versions
...
This just makes sense, and was confusing beforehand.
Case-in-point: Two test classes for pools: pool_versions and pool_archive
2022-08-06 18:58:24 +02:00
Earlopain
8c842fef7e
[Posts] Move popular posts route to /popular
2022-08-06 11:07:25 +02:00
Earlopain
7e33ea8271
[Cleanup] Remove pool is_deleted
...
Pools are hard-deleted now. There are also a few pools with this flag
which can't be properly deleted at the moment
2022-07-11 22:52:26 +02:00
Earlopain
7531fc9894
[Cleanup] Remove an assortment of unused code
2022-07-11 20:17:24 +02:00
Earlopain
2b8173e05a
[Tests] Small amount of fixes
2022-05-26 22:49:43 +02:00
Earlopain
10cc7e7dba
[Cleanup] Remove iqdb test helper
2022-05-26 19:35:46 +02:00
Earlopain
eff1500059
[Cleanup] Remove some unusted dev/test gems
2022-05-26 19:23:25 +02:00
Earlopain
b05a8a5a51
[Cleanup] Replace ruby-imagespec with Vips::Image
...
ImageSpec is also capable of providing sizes for flash, but that isn't
exactly relevant anymore
2022-05-26 18:10:20 +02:00
Earlopain
3b714dd726
[EmailBlacklist] Only unverify exact domain matches
2022-05-23 08:10:54 +02:00
Earlopain
b2a733d0c4
[Replacements] Fix duration when replacing gif -> webm
2022-05-22 21:39:21 +02:00
Earlopain
2af251b387
[Uploads] Allow denying uploads per user level
2022-05-22 21:17:12 +02:00
Earlopain
3187ee169b
[TagRelations] Require a reason on create
2022-05-22 18:59:45 +02:00
Earlopain
98ab543e59
[TagRelations] Refactor alias/implication request code
2022-05-22 17:05:12 +02:00
Earlopain
3108613b0e
[EmailBlacklist] Unverify existing users on create
2022-05-22 15:21:41 +02:00
Earlopain
2b079eabb9
[PostEvent] Fix unflag event on approve not being created
2022-05-22 14:47:11 +02:00
Earlopain
93cd28c0e1
[Posts] Change comment locked to disabled
...
Instead of just preventing new comments hide everything completly.
2022-05-16 15:53:39 +02:00
Earlopain
2f5b55a0bc
[Comments] Hide a few buttons on sticky
2022-05-16 14:42:44 +02:00
Earlopain
6d3f272e90
[Posts] Allow locking comment sections
2022-05-16 14:20:11 +02:00
Earlopain
c9f14e7836
[Replacements] Run full file validation on create
2022-05-08 20:47:11 +02:00
Earlopain
bd864449aa
[Uploads] Extract video methods
2022-05-08 20:01:39 +02:00
Earlopain
61f06cde5d
[Uploads] Extract some more file methods
2022-05-08 19:05:12 +02:00
Jason Gronn
23253d6766
[Comments] Disable downvoting own comment ( #397 )
...
* Disable downvoting own comment; hide vote buttons for own comment
* Revert hiding buttons; merge upvote/downvote paths; fix tests that relied on previous behaviour
* Undo some changes I did not mean to make
* Fix a mistake I made
* Fix some other unit tests
2022-04-30 12:48:53 +02:00
Earlopain
e18a2602b6
[Tests] Small amount of fixes
2022-04-21 21:23:33 +02:00
Earlopain
20146b106d
[Tests] A bunch of more fixes
2022-04-13 08:54:50 +02:00
Earlopain
5528f43b0d
[Sessions] Remove GET
logout route
...
No more accidentally logging out just because you clicked on a link
https://e621.net/forum_topics/31292
2022-04-09 22:45:00 +02:00