Eugen Rochko
9eefd60136
Add explit admin actions to (re)subscribe/unsubscribe remote accounts ( #3640 )
...
* Add explit admin actions to (re)subscribe/unsubscribe remote accounts
and re-download avatar/header
* Improve how admin NSFW toggle looks
2017-06-08 14:58:22 +02:00
Yamagishi Kazutoshi
5da41e0cae
Improve RuboCop rules (compatibility to Code Climate) ( #3636 )
...
08f8de84eb/Gemfile.lock (L38)
Code Climate is using RuboCop v0.46.0.
Change several rules to maintain compatibility.
2017-06-08 13:24:28 +02:00
Matt Jankowski
76f986d07b
Clean up for api/base controller ( #3629 )
...
* 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
Matt Jankowski
9a43a1051a
Coverage improvement and concern extraction for rate limit headers in API controller ( #3625 )
...
* Coverage for rate limit headers
* Move rate limit headers methods to concern
* Move throttle check to condition on before_action
* Move match_data variable into method
* Move utc timestamp to separate method
* Move header setting into smaller methods
* specs cleanup
2017-06-07 17:23:26 +02:00
Eugen Rochko
143ab47410
Fix #3063 - Add dynamic app manifest ( #3563 )
...
* Fix #3063 - Add dynamic app manifest
* Added short_name
* Add background_color
2017-06-06 19:29:42 +02:00
Daigo 3 Dango
e1142e190b
Redirect to streaming_api_base_url ( #3579 )
...
* Redirect to streaming_api_base_url
When Rails receives a request to streaming API, it most likely
means that there is another host which is configured to respond
to it. This is to redirect clients to that host if
`STREAMING_API_BASE_URL` is set as another host.
* Use the new Ruby 1.9 hash syntax
2017-06-05 12:09:29 +02:00
Naoki Kosaka
13aa805de8
Fix limit_param in favourites_controller.rb ( #3553 )
2017-06-04 14:52:26 +02:00
takayamaki
aa6740c21b
change sidekiq queueing to bulk push ( #3536 )
2017-06-04 00:11:15 +02:00
ThibG
810dd86991
Ensure well_known controllers use WEB_DOMAIN by including RoutingHelper ( #2388 )
...
This fixes #2375 .
2017-06-02 22:21:36 +02:00
Akihiko Odaki (@fn_aki@pawoo.net)
2c511bbad4
Spec response for forgery ( #3248 )
...
Remove protect_from_forgery in ApiController, which is disabled by the
following skip_before_action, as well.
2017-06-01 20:56:55 +02:00
Matt Jankowski
1066fd1ab5
Spec coverage and refactor for the api/v1/accounts controllers ( #3451 )
2017-05-31 21:36:24 +02:00
Matt Jankowski
81ce4e4318
Move admin/pubsubhubbub controller to admin/subscriptions ( #3442 )
2017-05-31 20:39:35 +02:00
Matt Jankowski
deb4ae7392
Add Instance class to list admin records ( #3443 )
2017-05-31 20:38:44 +02:00
Matt Jankowski
0985a9ff7d
Improve spec coverage and clean up api/v1/blocks controller ( #3464 )
2017-05-31 20:34:51 +02:00
Matt Jankowski
ae721f376a
Improve spec coverage and clean up api/v1/follow_requests controller ( #3465 )
2017-05-31 20:32:11 +02:00
Matt Jankowski
e32b9ecbf6
Improve spec coverage and clean up api/v1/domain_blocks controller ( #3466 )
2017-05-31 20:31:14 +02:00
Matt Jankowski
7b8b5b9f1e
Refactor api/v1/notifications controller ( #3470 )
2017-05-31 20:30:55 +02:00
Matt Jankowski
6237abaaa3
Improve spec coverage and clean up api/v1/favourites controller ( #3472 )
2017-05-31 20:30:39 +02:00
Matt Jankowski
3e95a6c9b7
Improve spec coverage and clean up api/v1/mutes controller ( #3481 )
2017-05-31 20:27:34 +02:00
Matt Jankowski
b89dbac199
Refactor and spec coverage for api/v1/timelines actions ( #3482 )
2017-05-31 20:27:17 +02:00
Matt Jankowski
12e795d0a7
Refactor api/v1/apps controller ( #3471 )
2017-05-30 21:16:28 -04:00
Matt Jankowski
cc92e6be3e
Refactor api/v1/reports controller ( #3469 )
2017-05-30 21:13:31 -04:00
Matt Jankowski
3d2927caa2
Refactor api/v1/search controller ( #3468 )
2017-05-30 21:11:54 -04:00
Matt Jankowski
8b69d8d46d
Improve spec coverage and clean up api/v1/media controller ( #3467 )
2017-05-30 21:11:29 -04:00
Matt Jankowski
5a54a5ba69
Clean up api/subscriptions controller ( #3448 )
2017-05-31 02:15:09 +02:00
Jack Jennings
4e75c71b3e
Add status destroy authorization to policy ( #3453 )
...
* Add status destroy authorization to policy
* Create explicit unreblog status authorization
2017-05-30 22:56:31 +02:00
Matt Jankowski
4e89226243
Improve api oembed controller ( #3450 )
...
* Add StreamEntryFinder class to parse URLs
* Use StreamEntryFinder and clean up api/oembed controller
2017-05-30 16:30:06 -04:00
Matt Jankowski
0ee8f559ec
Clean up api/salmon controller ( #3449 )
2017-05-30 16:28:58 -04:00
Matt Jankowski
18c81c74e5
Remove exports/base controller in favor of shared concern ( #3444 )
2017-05-30 19:06:01 +02:00
Jack Jennings
faf53a5a3e
Extract authorization policy for viewing statuses ( #3150 )
2017-05-29 18:22:22 +02:00
Akihiko Odaki
ff2bfea0b3
Remove methods from ObfuscateFilename and spec ( #3347 )
...
* Remove methods from ObfuscateFilename
* Spec ObfuscateFilename
2017-05-29 18:14:16 +02:00
Atsushi Yamamoto
4547e3585a
Add preference setting for delete toot modal ( #3368 )
...
* Set delete_modal preference to true by default
* Does not show confirmation modal if delete_modal is false
* Add ja translation for preference setting page
2017-05-29 17:56:13 +02:00
unarist
f7283b1f0f
Fix empty flash message on the settings page ( #3345 )
2017-05-27 13:04:28 +02:00
Akihiko Odaki
4c8708522a
Remove redundant call of recent scope in AccountsController ( #3330 )
...
recent is included in paginate_by_max_id.
2017-05-26 16:35:25 +02:00
Akinori MUSHA
8a5d3b2e5d
Go to root after login in single user mode ( #3289 )
...
In single user mode, visitors are redirected to the single user's
profile page. So, if you are the owner without a session, you start
from that page, click the login button and authenticate yourself
expecting you'll soon get started with the home page, but in reality
you'll get redirected back to where you started from -- your own
profile page.
This fixes the behavior by redirecting you home after login if you
have started from your own profile page.
2017-05-26 14:14:03 +02:00
unarist
af368a2d12
More use of next link header on account (media) timelines ( #3311 )
...
This will reduce requests on who have only few statuses.
- Use next link header to detect more items from first request
- Omit next link header if result items are fewer than requested count
(It had omit it only if result was empty before)
2017-05-25 17:09:13 +02:00
Yamagishi Kazutoshi
09f5091102
Show error message to suspended user ( #3281 )
2017-05-24 16:39:09 +02:00
unarist
9642bdbe0a
Fix following/followers API to return correct link headers ( #3268 )
...
Link headers in following/followers API should include follow_id as max_id/since_id.
However, these API use current_user's account_id instead of follow_id from #3167 .
This causes irrelevant result on loading more users.
2017-05-23 23:26:23 +02:00
Eugen Rochko
b886ecea5c
Fix Devise destroy method being available to delete user record ( #3266 )
...
(You may think that we need account deletions, but this way would've just orphaned the db records)
2017-05-23 21:32:42 +02:00
alpaca-tc
46ca699d72
Toggle sensitive from admin page ( #3261 )
2017-05-23 19:45:43 +02:00
Matt Jankowski
fecc2c2f47
Refactor of API timeline actions ( #3263 )
...
- Increase coverage to exercise all parts of each action
- Move into namespace to share common code
- Misc refactor of each action for smaller methods, simpler code
2017-05-23 18:11:39 +02:00
Akihiko Odaki
d670290506
Cover StreamEntriesController more and remove redundant instructions ( #3257 )
...
* Cover StreamEntriesController more
* Remove redundant instructions in StreamEntriesController
2017-05-23 15:04:23 +02:00
Akihiko Odaki
4f023cb001
Introduce recent to Follow ( #3247 )
...
Introduce recent to Follow, as Account and other models have.
This change also adds specs for the scope and the dependents.
2017-05-23 13:12:19 +02:00
Akihiko Odaki
9cc7a3c209
Cover AccountsController more in spec ( #3229 )
...
* Introduce recent scope to Status and StreamEntry
Introduce recent scope to Status and StreamEntry as Account has.
* Cover AccountsController more in AccountsController
2017-05-23 02:53:01 +02:00
Matt Jankowski
4f2a0f546d
Coverage for api/web/settings controller ( #3238 )
2017-05-22 23:12:28 +02:00
Tomonori Murakami
323eeb096c
Fix locale bug when change it on preferences ( #3223 ) ( #3232 )
2017-05-22 17:58:41 +02:00
Immae
ae917bfb23
Allow alternate domains for mastodon handlers ( #3187 )
2017-05-22 15:40:04 +02:00
Yamagishi Kazutoshi
410a684c3b
Change "Account.any?" to "Account.exists?" ( #3217 )
2017-05-22 15:02:30 +02:00
Akihiko Odaki
cbd9804857
single_user_mode? always returns boolean ( #3215 )
...
This change also adds a specification for the method.
2017-05-22 06:00:06 +02:00
Akihiko Odaki
90c8175cb0
Fix mutes_controller error and incorrect statuses_controller report ( #3202 )
...
This commit fixes a regression in commit
9d32e7f6d5
.
2017-05-21 13:32:13 +02:00