]> cat aescling's git repositories - mastodon.git/commit
Change unapproved and unconfirmed account to not be accessible in the REST API (...
authorClaire <claire.github-309c@sitedethib.com>
Thu, 26 May 2022 13:50:33 +0000 (15:50 +0200)
committersingle-right-quote <11325618-aescling@users.noreply.gitlab.com>
Fri, 27 May 2022 03:54:58 +0000 (23:54 -0400)
commite6ed0bfdaeccd70bbf3e674a947354adfe243d4d
tree607e7304f7337d490350842039c25c3f8d95db55
parent5c442b6e8679fd77918fff9daa9e46cf56893b2f
Change unapproved and unconfirmed account to not be accessible in the REST API (#17530)

* Change unapproved and unconfirmed account to not be accessible in the REST API

* Change Account#searchable? to reject unconfirmed and unapproved users

* Disable search for unapproved and unconfirmed users in Account.search_for

* Disable search for unapproved and unconfirmed users in Account.advanced_search_for

* Remove unconfirmed and unapproved accounts from Account.searchable scope

* Prevent mentions to unapproved/unconfirmed accounts

* Fix some old tests for Account.advanced_search_for

* Add some Account.advanced_search_for tests for existing behaviors

* Add some tests for Account.search_for

* Add Account.advanced_search_for tests unconfirmed and unapproved accounts

* Add Account.searchable tests

* Fix Account.without_unapproved scope potentially messing with previously-applied scopes

* Allow lookup of unconfirmed/unapproved accounts through /api/v1/accounts/lookup

This is so that the API can still be used to check whether an username is free
to use.
app/controllers/api/v1/accounts_controller.rb
app/models/account.rb
app/services/process_mentions_service.rb
spec/models/account_spec.rb