Commit Graph

175 Commits (dcc614f869b9484fc3aa601405d7e1988e166403)

Author SHA1 Message Date
alpaca-tc 8c9aff0bef Render sidekiq scheduler (#2898) 8 years ago
Yamagishi Kazutoshi d7c17c32af Fix redirect path for admin (#2871) 8 years ago
Matt Jankowski 2bd132d458 Replace best_in_place editor on admin settings page (#2789)
* Remove best_in_place

* Replace best_in_place usage with rails helpers

* Move admin/settings#index to #edit action

* Remove click_to__edit from i18n
8 years ago
Kaylee 7880671f35 Add option to disable two factor auth in admin accounts panel. (#2584)
* Add option to disable two factor auth in admin accounts panel.
Closes #2578

* Add @mjankowski's suggestions.
* Moves destroy actions behind User#disable_two_factor!
* Adds spec coverage for Admin:TwoFactorAuthenticationsController and User#disable_two_factor!
8 years ago
Matt Jankowski 0618f09939 Add spec coverage and refactor authorize_follows controller (#2505) 8 years ago
Eugen 501514960a Followers-only post federation (#2111)
* Make private toots get PuSHed to subscription URLs that belong to domains where you have approved followers

* Authorized followers controller, stub for bulk action

* Soft block in the background

* Add simple test for new controller

* Rename Settings::FollowersController to Settings::FollowerDomainsController, paginate results,
rename "private" post setting to "followers-only", fix pagination style, improve post privacy
preferences style, improve warning style

* Extract compose form warnings into own container, show warning when posting to followers-only with unlocked account
8 years ago
Evan Minto 66fd8e7821 ActivityPub: Add basic, read-only support for Outboxes, Notes, and Create/Announce Activities (#2197)
* Clean up collapsible components

* Expose user Outboxes and AS2 representations of statuses

* Save work thus far.

* Fix bad merge.

* Save my work

* Clean up pagination.

* First test working.

* Add tests.

* Add Forbidden error template.

* Revert yarn.lock changes.

* Fix code style deviations and use localized instead of hardcoded English text.
8 years ago
Ash Furrow 723f25a999 Admin UI for confirming users (#2245)
* Shows confirmed status in list.

* Adds ability to confirm users in admin UI.

* Added new english translations.

* Addresses feedback from #2245.

* More feedback.
8 years ago
Matt Jankowski 67dea31b0f 2FA controller cleanup (#2296)
* Add spec coverage for settings/two_factor_auth area

* extract setup method for qr code

* Move otp required check to before action

* Merge method only used once

* Remove duplicate view

* Consolidate creation of @codes for backup

* Move settings/2fq#recovery_codes to settings/recovery_codes#create

* Rename settings/two_factor_auth#disable to #destroy

* Add coverage for the otp required path on 2fa#show

* Clean up the recovery codes list styles

* Move settings/two_factor_auth to settings/two_factor_authentication

* Reorganize the settings two factor auth area

Updated to use a flow like:

- settings/two_factor_authentication goes to a #show view which has a button
  either enable or disable 2fa on the account
- the disable button turns off the otp requirement for the user
- the enable button cycles the user secret and redirects to a confirmation page
- the confirmation page is a #new view which shows the QR code for user
- that page posts to #create which verifies the code, and creates the recovery
  codes
- that create action shares a view with a recovery codes controller which can be
  used separately to reset codes if needed
8 years ago
Ashley 05ac28f3e4 Added API for single notification dismissal (#2251)
* Added API backend for notification dismissal

* Added render statement

* Changed statement
8 years ago
Matt Jankowski 8bac0350d1 Restful refactor of accounts/ routes (#2133)
* Add routing specs for accounts followers and following actions

* Use more restful route naming for public account follow pages

Moves two actions:
- accounts#followers to accounts/follower_accounts#index
- accounts#following to accounts/following_accounts#index

Adds routing spec to ensure prior URLs are preserved.
8 years ago
Matt Jankowski 55e1503522 Instances list in admin (#2095)
* Add admin/instances index action

* Add link to instances admin page

* View lists instances

* Instances, grouped by domain, ordered by count

* Use Account.remote scope

* Extract method: Account.by_domain_accounts
8 years ago
Matt Jankowski 21a767dcfa Improve handling of HTTP_ACCEPT for webfinger (#2008)
This change includes:

- Improve the spec coverage for incoming request to the webfinger action
- For requests without an accept header (ie, what a browser might look like),
  return a JSON response.
- For requests with an explicit format of xml or json, return that format.
- For requests using an accept header, return that format.

Also adds failing spec showing webfinger does not return xml, which covers the
issue described in: https://github.com/tootsuite/mastodon/issues/1983
8 years ago
Eugen 5d710b1139 Make file attachment on MediaAttachment optional (#1865)
Create MediaAttachment but without actual file download when domain is blocked with reject_media set to true
Clean up old media files when creating a new domain block with reject_media set to true
Return remote_url in media attachments API if local file is not present
Undo domain block action in admin UI
Ability to enable reject_media from admin UI
8 years ago
Matt Jankowski 6670e6d33f Add password reset for users from admin accounts area (#1841) 8 years ago
Patrick Figel df4ff9a8e1 Add recovery code support for two-factor auth (#1773)
* Add recovery code support for two-factor auth

When users enable two-factor auth, the app now generates ten
single-use recovery codes. Users are encouraged to print the codes
and store them in a safe place.

The two-factor prompt during login now accepts both OTP codes and
recovery codes.

The two-factor settings UI allows users to regenerated lost
recovery codes. Users who have set up two-factor auth prior to
this feature being added can use it to generate recovery codes
for the first time.

Fixes #563 and fixes #987

* Set OTP_SECRET in test enviroment

* add missing .html to view file names
8 years ago
Matt Jankowski 8b74aa4217 Admin reports controller improvements (#1714)
* Simplify admin/reports controller filtering for index

* Rename parameter to resolved

* Fix issue where reports view could not access filter_link_to

* Add coverage for admin/reports controller

* DRY up resolution of related reports for target account

* Clean up admin/reports routes

* Add Report#statuses method

* DRY up current account action taken params

* Rubocop styles
8 years ago
Matt Jankowski 137100dcf3 Clean up well-known routes/controllers (#1649)
* Add request spec for host meta route returning xml

* Add routing spec for xrd routes

* Update well-known routes

* Move webfinger and host-meta actions to their own controllers
8 years ago
Matt Jankowski 3a9eb81a80 Admin accounts controller cleanup (#1664)
* Remove unused account_params method in admin/accounts controller

* Introduce AccountFilter to find accounts

* Use AccountFilter in admin/accounts controller

* Use more restful routes admin silence and suspension area

* Add admin/silences and admin/suspensions controllers
8 years ago
Matt Jankowski 7f0a865b05 Allow import/export of mutes list (#1541)
* Allow export of mutes list

* Allow importing of mutes list

* Refactor to use Settings::Exports::BaseController and DRY up exports code
8 years ago
Matt Jankowski b352a8e5d4 Default to json type for webfinger requests (#1583) 8 years ago
Matt Jankowski 3ddd936b03 Refactor exports controller (#1567)
* Add basic coverage for settings/exports controller

* Remove unused @account variable from settings/exports controller

* Add coverage for download export actions

* Remove deprecated `render :text` in favor of `send_data` for csv downloads

* Add model to handle exports

* Use Export class in settings/exports controller

* Simplify settings/exports controller methods

* Move settings/export to more restful routes
8 years ago
David Celis d4fe6cd2bf Allow users to update their Account in the API (#1179)
* Allow users to update their Account in the API

It would be nice for API clients to be able to allow users to update
their accounts without having to wrap Mastodon in a web view. This patch
adds an API endpoint to let users submit a PATCH for their account.

Signed-off-by: David Celis <me@davidcel.is>

* Add /api/v1/accounts/update_credentials to the API docs

Signed-off-by: David Celis <me@davidcel.is>
8 years ago
Matt Jankowski e5282e4ec0 Clean up about page (#1282)
* Add InstancePresenter to expose site details

* Clean up about controller, use instance presenter
8 years ago
Matt Jankowski 71706f21c2 Ignore implied formats for catch all route requests (#1340)
A request to `/test` would show the custom 404 page, but a request to
`/test.test` would return a 404 with an empty body.

This change ignores the format on incoming catch all route requests, so that the
html 404 page is returned on these requests.
8 years ago
Eugen 9acdb166e8 Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled (#1278)
* Fix #795, fix #704, fix #835 - 2FA requires confirmation to be enabled
TOTP secret is not shown again after 2FA is enabled

* Clean up
8 years ago
Eugen Rochko e3a3422a65 Allow setting of default language through config
Setting of locale in controller extracted to Localized concern,
the doorkeeper authorized applications controller moved under
custom namespace with inclusion of Localized, which resolves the
"it sometimes appears in a different random language" bug
8 years ago
Eugen Rochko b7c1b12367 Make default admin UI page reports. Add admin UI for creating a domain block 8 years ago
Eugen Rochko e8875c6046 Import feature for following/blocking lists (addresses #62, #177, #201, #454) 8 years ago
Eugen Rochko d6ed2eb512 Prettier account and stream entry URLs 8 years ago
Eugen Rochko 05cf086766 New API method: /api/v1/search
Returns accounts, statuses, hashtags arrays
8 years ago
Eugen Rochko 56d998cbdb Export follow/block lists as CSV 8 years ago
Eugen Rochko 6be7bde243 Fix #525 - Add instance information API 8 years ago
Eugen e245115f47 Merge branch 'master' into mastodon-site-api 8 years ago
Eugen Rochko 5f4e402204 Improved /api/v1/accounts/:id/statuses with new params: only_media, exclude_replies
Redirect /:username to /users/:username
Redirect /:username/:id to /users/:username/updates/:id
Updated API documentation and sponsors
8 years ago
Kit Redgrave 442fdbfc53 Mute button progress so far. WIP, doesn't entirely work correctly. 8 years ago
Kibigo 620f70e42c Adds site metadata access to the API 8 years ago
Eugen Rochko 175a9b9caa Fix #104 - Style OAuth authorized applications page
Add ability to search accounts by display name
8 years ago
Eugen Rochko 8132cf8153 Add GET /api/v1/accounts/:id/statuses/media that returns only statuses with media attachments
Make replies default to privacy settings of the status being replied to
8 years ago
Eugen Rochko d0f087db2d Add UI to view report details, remove reported statuses, quick links to resolve/silence/suspend from report 8 years ago
Eugen Rochko 24ba7c9762 Adding index overview for reports in admin UI 8 years ago
Eugen Rochko 5426f06ac2 Fix admin UI for accounts somewhat 8 years ago
Eugen Rochko 3b81baaaaf Adding POST /api/v1/reports API, and a UI for submitting reports 8 years ago
Eugen Rochko 0518492158 Stop trying to shoehorn all Salmon updates into the poor database-connected
StreamEntry model. Simply render Salmon slaps as they are needed
8 years ago
Eugen Rochko 77e13c2bc9 Removing failed push notification API, make context loads use cache 8 years ago
Eugen Rochko d9ca46b464 Cleaning up format of broadcast real-time messages, removing
redis-backed "mentions" timeline as redundant (given notifications)
8 years ago
Eugen Rochko 3f075c7794 API for apps to register for push notifications 8 years ago
Eugen Rochko ba192f12e3 Added optional two-factor authentication 8 years ago
Effy Elden 07b9a10d4d Add redirect for /admin => /admin/settings 8 years ago
Eugen Rochko f392030ab8 Add /api/v1/notifications/clear, non-existing link cards for statuses will
now return empty hash instead of throwing a 404 error. When following,
merge into timeline will filter statuses
8 years ago
Eugen Rochko e028406db4 Fix code style 8 years ago
Eugen Rochko d72dd38c13 Merge branch 'master' of https://github.com/ineffyble/mastodon into ineffyble-master 8 years ago
Eugen Rochko 3a4b5961be Method to fetch a single notification 8 years ago
Effy Elden 5fef55c11a Set remote dev environments to use letter_opener_web, add default .env.vagrant variables 8 years ago
Eugen Rochko f0de621e76 Fix #463 - Fetch and display previews of URLs using OpenGraph tags 8 years ago
Eugen Rochko e25170f960 Add extended about page stub 8 years ago
Eugen Rochko b11fdc3ae3 Migrate from ledermann/rails-settings to rails-settings-cached which allows global settings
with YAML-defined defaults. Add admin page for editing global settings. Add "site_description"
setting that would show as a paragraph on the frontpage
8 years ago
Eugen Rochko 75f80bef10 Persist UI settings, add missing localizations for German 8 years ago
Eugen Rochko 2b0b7ff1b8 Fix #385 - /web now loads a page 8 years ago
Eugen Rochko 8f47f6a7ec Adding remote follow button 8 years ago
Eugen Rochko a302e56f9a Add API for retrieving favourites 8 years ago
Eugen Rochko 49834a6e7f Add API for retrieving blocked accounts 8 years ago
Eugen Rochko d7dc84439c Add ability to use remote follow function on other sites 8 years ago
Eugen Rochko 3689c119f0 Replacing follow requests in the settings area with in-UI column 8 years ago
Eugen Rochko 004382e4d0 Adding follow requests API 8 years ago
Eugen Rochko b302b9202b Add page for authorizing/rejecting follow requests 8 years ago
Eugen Rochko aed25932b5 Add OEmbed iframe HTML, convert emojis on public pages, increase size of attachment thumbnails 8 years ago
Eugen Rochko 76ec907993 Improved admin UI 8 years ago
Eugen Rochko f978b06dd1 Add suspend account functionality to admin UI 8 years ago
Eugen Rochko 9d9f796130 Adding more to admin accounts UI 8 years ago
Eugen Rochko 6ff93845d5 Add basic OEmbed provider API, fix #247 8 years ago
Eugen Rochko 356d3874eb Normalize localizations, add stub for admin/accounts 8 years ago
Eugen Rochko 27fc49d745 Add simple admin overview of PuSH subscriptions 8 years ago
Eugen Rochko 2d2c81765b Adding embedded PuSH server 8 years ago
Eugen Rochko 8efa081f21 Remove Neo4J 8 years ago
Eugen Rochko da2ef4d676 Adding unified streamable notifications 8 years ago
Eugen Rochko d42ed78aa4 Fix #110 - Make web UI use browser history, change links in e-mails to link to that 8 years ago
Eugen Rochko 09218d4c01 Use full-text search for autosuggestions 8 years ago
Eugen Rochko b13e7dda1f API pagination for all collections using Link header 8 years ago
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
8 years ago
Eugen Rochko 48b9619439 Adding hashtags 8 years ago
Eugen Rochko 6471a548fe Add pghero for analyzing postgres performance in production 8 years ago
Eugen Rochko e4671adc25 Fix reblogged/favourited caching; add API endpoints for who favd/reblogged status 8 years ago
Eugen Rochko dd03118098 Fix follow icon changing plus to minus, add terms page stub 8 years ago
Eugen Rochko e0a197650a Adding common followers API, fixing fallback query again 8 years ago
Eugen Rochko a9e40a3d80 Adding OAuth access scopes, fixing OAuth authorization UI, adding rate limiting
to the API
8 years ago
Eugen Rochko e21a3fe0cd Adding sync of follow relationships to Neo4J, accounts/suggestions API 8 years ago
Eugen Rochko 7a6d95f70c E-mail preferences page 8 years ago
Eugen Rochko 1f650d327d Adding public timeline 8 years ago
Eugen Rochko 3554d638b3 Fix #72 - add follow/unfollow button to public profiles 8 years ago
Eugen Rochko 7b9a4af311 API for blocking and unblocking 8 years ago
Eugen Rochko fc198a8b4c Adding e-mail confirmations 8 years ago
Eugen Rochko 6d7290f47c Add API for getting info about authenticated user: /api/v1/accounts/verify_credentials 8 years ago
Eugen Rochko e63aebff7a Adding landing page 8 years ago
Eugen Rochko 4f9b7432dd Fix #52 - Add API versioning (v1) 8 years ago
Eugen Rochko 7e14eefc81 Replace logo, fix #57 - delete/unreblog/unfavourite API, fix #45 - app
registration API
8 years ago
Eugen Rochko e46abc71ca Fix notifications in UI, added new API for fetching account relationships 8 years ago
Eugen Rochko bd5ad304ba Adding media controller, 1 webm/compose form allowed, previews generated 8 years ago
Eugen Rochko 5b0cef9781 Setting up preliminary "detailed" routes in the UI, new API end-point for fetching status context 8 years ago
Eugen Rochko 85d89b472d Optimized n+1 queries in accounts Atom and HTML views
Added stack trace for SQL queries in development
Removed badly thought out accounts/lookup API
8 years ago