Commit Graph

12 Commits (d091159140eff811657f7cc741542ec87aef4d9c)

Author SHA1 Message Date
Eugen Rochko 5ddcdf3753 Support min_id-based pagination in REST API ()
* Allow min_id pagination in Feed#get

* Add min_id pagination to home and list timeline APIs

* Add min_id pagination to account statuses, public and tag APIs

* Remove unused stub in reports API

* Use min_id pagination in notifications, favourites, and fix order

* Fix HomeFeed#from_database not using paginate_by_id
2018-09-28 02:23:45 +02:00
Eugen Rochko 72a8ca84e0 Add force_login option to OAuth authorize page ()
* Add force_login option to OAuth authorize page

For when a user needs to sign into an app from multiple accounts
on the same server

* When logging out from modal header, redirect back after re-login
2018-09-09 04:10:44 +02:00
Eugen Rochko 413a28499d Allow mods to disable login, improve message when login disabled ()
* Allow moderators to disable/enable login

* Instead of rejecting login, show forbidden error when login disabled

Avoid confusion because when login is rejected, the message is that
the account is not activated, which is wrong.

* Fix tests
2018-08-23 23:26:29 +02:00
Eugen Rochko 34fdf77f48 Add more granular OAuth scopes ()
* Add more granular OAuth scopes

* Add human-readable descriptions of the new scopes

* Ensure new scopes look good on the app UI

* Add tests

* Group scopes in screen and color-code dangerous ones

* Fix wrong extra scope
2018-07-05 18:31:35 +02:00
Eugen Rochko af240ff13c Disable API access when login is disabled () 2018-04-30 09:13:14 +02:00
Eugen Rochko f410afe59e Ensure that boolean params in the API are parsed for truthiness ()
Use Rails smart boolean cast to account for values such as "f",
"0", "false", etc. Previously, if a param was present in the request,
it would count as true.
2018-03-01 02:47:59 +01:00
nightpool eac9039a63 Refactor /api/web APIs to use the centralized axios instance ()
Also adds the ability to decouple the centralized axios logic from the
state dispatcher
2018-01-08 20:01:33 +01:00
abcang cef07895a9 Remove unused function () 2017-12-09 23:37:31 +01:00
Yamagishi Kazutoshi c0642a0042 Don't send Link header when don't know prev and next links () 2017-08-18 10:42:59 +02:00
abcang efd907e32e Fix require_user! behavior when not logged in () 2017-08-15 14:14:12 +02:00
Eugen Rochko 75ab767791 Fix webfinger retries ()
* Do not raise unretryable exceptions in ResolveRemoteAccountService

* Removed fatal exceptions from ResolveRemoteAccountService

Exceptions that cannot be retried should not be raised. New exception
class for those that can be retried (Mastodon::UnexpectedResponseError)
2017-07-20 01:59:07 +02:00
Matt Jankowski 76f986d07b Clean up for api/base controller ()
* Move ApiController to Api/BaseController

* API controllers inherit from Api::BaseController

* Add coverage for various error cases in api/base controller
2017-06-07 20:09:25 +02:00