Commit Graph

15 Commits (15969171c18844d61e252bc4b13a2b6875e8cbba)

Author SHA1 Message Date
Eugen Rochko 1f6ed4f86a
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
Eugen Rochko 90f12f2e5a
Focal points ()
* Add focus param to media API, center thumbnails on focus point

* Add UI for setting a focal point

* Improve focal point icon on upload item

* Use focal point in upload preview

* Add focalPoint property to ActivityPub

* Don't show focal point button for non-image attachments
Eugen Rochko 4ec1771165 Add ability to specify alternative text for media attachments ()
* Fix  - Add ability to specify alternative text for media attachments

- POST /api/v1/media accepts `description` straight away
- PUT /api/v1/media/:id to update `description` (only for unattached ones)
- Serialized as `name` of Document object in ActivityPub
- Uploads form adjusted for better performance and description input

* Add tests

* Change undo button blend mode to difference
Eugen Rochko 8b2cad5637 Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl ()
Matt Jankowski 73540ffe6b 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
Matt Jankowski 8235623362 Improve spec coverage and clean up api/v1/media controller ()
Eugen Rochko 4c53af64f0 Fix ActionController::Parameters in API issue
Alyssa Ross cefef2c571 Extract filename obfuscation into module
Andrea Faulds 7161f91313 Rename media to avoid exposing filename (fixes )
Eugen Rochko fdc17bea58 Fix rubocop issues, introduce usage of frozen literal to improve performance
Eugen Rochko b13e7dda1f API pagination for all collections using Link header
Eugen Rochko 9aecc0f48a Move timelines API from statuses to its own controller, add a check for
resources that require a user context vs those that don't (such as public timeline)

/api/v1/statuses/public   -> /api/v1/timelines/public
/api/v1/statuses/home     -> /api/v1/timelines/home
/api/v1/statuses/mentions -> /api/v1/timelines/mentions
/api/v1/statuses/tag/:tag -> /api/v1/timelines/tag/:tag
Eugen Rochko a9e40a3d80 Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting
to the API
Eugen Rochko 2f5b205916 Catch Paperclip errors on /api/v1/media, return early from update profile service if XML given is nil
Eugen Rochko 4f9b7432dd Fix - Add API versioning (v1)