mastodon/db/migrate
Eugen Rochko 5d2fc6de32
Add REST API for creating an account (#9572)
* Add REST API for creating an account

The method is available to apps with a token obtained via the client
credentials grant. It creates a user and account records, as well as
an access token for the app that initiated the request. The user is
unconfirmed, and an e-mail is sent as usual.

The method returns the access token, which the app should save for
later. The REST API is not available to users with unconfirmed
accounts, so the app must be smart to wait for the user to click a
link in their e-mail inbox.

The method is rate-limited by IP to 5 requests per 30 minutes.

* Redirect users back to app from confirmation if they were created with an app

* Add tests

* Return 403 on the method if registrations are not open

* Require agreement param to be true in the API when creating an account
2018-12-24 19:12:38 +01:00
..
20160220174730_create_accounts.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160220211917_create_statuses.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160221003140_create_users.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160221003621_create_follows.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160222122600_create_stream_entries.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160222143943_add_profile_fields_to_accounts.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160223162837_add_metadata_to_statuses.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160223164502_make_uris_nullable_in_statuses.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160223165723_add_url_to_statuses.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160223165855_add_url_to_accounts.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160223171800_create_favourites.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160224223247_create_mentions.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160227230233_add_attachment_avatar_to_accounts.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160305115639_add_devise_to_users.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160306172223_create_doorkeeper_tables.rb Lint pass (#8876) 2018-10-04 12:36:53 +02:00
20160312193225_add_attachment_header_to_accounts.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160314164231_add_owner_to_application.rb lint pass 2 (#8878) 2018-10-04 17:38:04 +02:00
20160316103650_add_missing_indices.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160322193748_add_avatar_remote_url_to_accounts.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160325130944_add_admin_to_users.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20160826155805_add_superapp_to_oauth_applications.rb
20160905150353_create_media_attachments.rb
20160919221059_add_subscription_expires_at_to_accounts.rb
20160920003904_remove_verify_token_from_accounts.rb
20160926213048_remove_owner_from_application.rb
20161003142332_add_confirmable_to_users.rb
20161003145426_create_blocks.rb
20161006213403_rails_settings_migration.rb Lint pass (#8876) 2018-10-04 12:36:53 +02:00
20161009120834_create_domain_blocks.rb
20161027172456_add_silenced_to_accounts.rb
20161104173623_create_tags.rb
20161105130633_create_statuses_tags_join_table.rb
20161116162355_add_locale_to_users.rb
20161119211120_create_notifications.rb
20161122163057_remove_unneeded_indexes.rb
20161123093447_add_sensitive_to_statuses.rb
20161128103007_create_subscriptions.rb
20161130142058_add_last_successful_delivery_at_to_subscriptions.rb
20161130185319_add_visibility_to_statuses.rb
20161202132159_add_in_reply_to_account_id_to_statuses.rb
20161203164520_add_from_account_id_to_notifications.rb
20161205214545_add_suspended_to_accounts.rb
20161221152630_add_hidden_to_stream_entries.rb
20161222201034_add_locked_to_accounts.rb
20161222204147_create_follow_requests.rb
20170105224407_add_shortcode_to_media_attachments.rb lint pass 2 (#8878) 2018-10-04 17:38:04 +02:00
20170109120109_create_web_settings.rb
20170112154826_migrate_settings.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20170114194937_add_application_to_statuses.rb
20170114203041_add_website_to_oauth_application.rb
20170119214911_create_preview_cards.rb
20170123162658_add_severity_to_domain_blocks.rb
20170123203248_add_reject_media_to_domain_blocks.rb
20170125145934_add_spoiler_text_to_statuses.rb
20170127165745_add_devise_two_factor_to_users.rb
20170129000348_create_devices.rb
20170205175257_remove_devices.rb
20170209184350_add_reply_to_statuses.rb
20170214110202_create_reports.rb
20170217012631_add_reblog_of_id_foreign_key_to_statuses.rb
20170301222600_create_mutes.rb Feature conversations muting (#3017) 2017-05-15 03:04:13 +02:00
20170303212857_add_last_emailed_at_to_users.rb
20170304202101_add_type_to_media_attachments.rb
20170317193015_add_search_index_to_accounts.rb
20170318214217_add_header_remote_url_to_accounts.rb
20170322021028_add_lowercase_index_to_accounts.rb
20170322143850_change_primary_key_to_bigint_on_statuses.rb
20170322162804_add_search_index_to_tags.rb
20170330021336_add_counter_caches.rb
20170330163835_create_imports.rb
20170330164118_add_attachment_data_to_imports.rb Add migration versions (#3574) 2017-06-05 02:43:02 +02:00
20170403172249_add_action_taken_by_account_id_to_reports.rb
20170405112956_add_index_on_mentions_status_id.rb
20170406215816_add_notifications_and_favourites_indices.rb
20170409170753_add_last_webfingered_at_to_accounts.rb Refresh webfinger (#1323) 2017-04-15 03:16:05 +02:00
20170414080609_add_devise_two_factor_backupable_to_users.rb Add recovery code support for two-factor auth (#1773) 2017-04-15 13:26:03 +02:00
20170414132105_add_language_to_statuses.rb Add language detection (#1772) 2017-04-16 20:32:17 +02:00
20170418160728_add_indexes_to_reports_for_accounts.rb Admin reports with accounts (#2092) 2017-04-18 19:36:18 +02:00
20170423005413_add_allowed_languages_to_user.rb Filter on allowed user language preferences (#2361) 2017-05-01 17:42:13 +02:00
20170424003227_create_account_domain_blocks.rb Account domain blocks (#2381) 2017-05-19 01:14:30 +02:00
20170424112722_add_status_id_index_to_statuses_tags.rb Add index to statuses_tags#status_id (#2394) 2017-04-24 15:10:14 +02:00
20170425131920_add_media_attachment_meta.rb Add media dimensions (#2448) 2017-04-26 03:48:12 +02:00
20170425202925_add_oembed_to_preview_cards.rb OEmbed support for PreviewCard (#2337) 2017-04-27 14:42:22 +02:00
20170427011934_re_add_owner_to_application.rb Application prefs section (#2758) 2017-08-22 18:33:57 +02:00
20170506235850_create_conversations.rb Add conversation model, <ostatus:conversation /> (#3016) 2017-05-12 19:09:21 +02:00
20170507000211_add_conversation_id_to_statuses.rb Add conversation model, <ostatus:conversation /> (#3016) 2017-05-12 19:09:21 +02:00
20170507141759_optimize_index_subscriptions.rb Add effective index to subscriptions (#2885) 2017-05-07 19:00:20 +02:00
20170508230434_create_conversation_mutes.rb Feature conversations muting (#3017) 2017-05-15 03:04:13 +02:00
20170516072309_add_index_accounts_on_uri.rb Make faster ProcessFeedService (#3080) 2017-05-16 12:12:29 +02:00
20170520145338_change_language_filter_to_opt_out.rb Filter languages with opt out (#3175) 2017-05-20 17:32:44 +02:00
20170601210557_add_index_on_media_attachments_account_id.rb Add index to media_attachments.account_id (#3510) 2017-06-02 16:18:54 +02:00
20170604144747_add_foreign_keys_for_accounts.rb Fix #3550 - Add all missing foreign keys (#3562) 2017-06-05 13:24:00 +02:00
20170606113804_change_tag_search_index_to_btree.rb Lint pass (#8876) 2018-10-04 12:36:53 +02:00
20170609145826_remove_default_language_from_statuses.rb Language detection defaults to nil (#3666) 2017-06-09 18:09:37 +02:00
20170610000000_add_statuses_index_on_account_id_id.rb Add index statuses on account_id and id (#3895) 2017-06-23 17:46:00 +02:00
20170623152212_create_session_activations.rb Revocable sessions (#3616) 2017-06-23 18:50:53 +02:00
20170624134742_add_description_to_session_activations.rb Add overview of active sessions (#3929) 2017-06-25 16:54:30 +02:00
20170625140443_add_access_token_id_to_session_activations.rb Bind web UI access tokens to sessions (#3940) 2017-06-25 23:51:32 +02:00
20170711225116_fix_null_booleans.rb Fix boolean columns sometimes having a null value (#4162) 2017-07-13 03:12:25 +02:00
20170713112503_make_tag_search_case_insensitive.rb Make tag search case insensitive again (#4184) 2017-07-13 19:31:33 +02:00
20170713175513_create_web_push_subscriptions.rb Web Push Notifications (#3243) 2017-07-13 22:15:32 +02:00
20170713190709_add_web_push_subscription_to_session_activations.rb Web Push Notifications (#3243) 2017-07-13 22:15:32 +02:00
20170714184731_add_domain_to_subscriptions.rb Fix #2672 - Connect signed PuSH subscription requests to instance domain (#4205) 2017-07-14 23:01:20 +02:00
20170716191202_add_hide_notifications_to_mute.rb Lint pass (#8876) 2018-10-04 12:36:53 +02:00
20170718211102_add_activitypub_to_accounts.rb Add ActivityPub attributes to accounts (#4273) 2017-07-19 17:06:46 +02:00
20170720000000_add_index_favourites_on_account_id_and_id.rb Add index favourites on account_id and id (#4360) 2017-07-26 03:35:25 +02:00
20170823162448_create_status_pins.rb Pinned statuses (#4675) 2017-08-25 01:41:18 +02:00
20170824103029_add_timestamps_to_status_pins.rb Allow multiple pinned statuses to be shown and make them be ordered b… (#4690) 2017-08-25 18:50:52 +02:00
20170829215220_remove_status_pins_account_index.rb Remove unneccesary indices (#4738) 2017-08-30 05:04:20 +02:00
20170901141119_truncate_preview_cards.rb Make PreviewCard records reuseable between statuses (#4642) 2017-09-01 16:20:16 +02:00
20170901142658_create_join_table_preview_cards_statuses.rb Make PreviewCard records reuseable between statuses (#4642) 2017-09-01 16:20:16 +02:00
20170905044538_add_index_id_account_id_activity_type_on_notifications.rb add index_notifications_on_id_and_account_id_and_activity_type on notifications table (#4750) 2017-09-05 12:30:01 +02:00
20170905165803_add_local_to_statuses.rb Fix locking migration on statuses table. Nullable column and NO default value (#4825) 2017-09-06 20:57:52 +02:00
20170913000752_create_site_uploads.rb Uploads for admin site settings (#4913) 2017-09-14 00:04:30 +02:00
20170917153509_create_custom_emojis.rb Custom emoji (#4988) 2017-09-19 02:42:40 +02:00
20170918125918_ids_to_bigints.rb Make IdsToBigints (mostly!) non-blocking (#5088) 2017-10-02 21:28:59 +02:00
20170920024819_status_ids_to_timestamp_ids.rb Fix typo in a db:rollback script (#5422) 2017-10-16 20:29:49 +02:00
20170920032311_fix_reblogs_in_feeds.rb Lint pass (#8876) 2018-10-04 12:36:53 +02:00
20170924022025_ids_to_bigints2.rb Forgotten in #5039, change statuses_tags tag_id to bigint (#5070) 2017-09-24 05:58:07 +02:00
20170927215609_add_description_to_media_attachments.rb Add ability to specify alternative text for media attachments (#5123) 2017-09-28 15:31:31 +02:00
20170928082043_create_email_domain_blocks.rb Implement EmailBlackList (#5109) 2017-10-04 15:16:10 +02:00
20171005102658_create_account_moderation_notes.rb Add moderation note (#5240) 2017-10-07 20:26:43 +02:00
20171005171936_add_disabled_to_custom_emojis.rb Improve admin UI for custom emojis, add copy/disable/enable (#5231) 2017-10-05 23:42:05 +02:00
20171006142024_add_uri_to_custom_emojis.rb Encode custom emojis as resolveable objects in ActivityPub (#5243) 2017-10-07 17:43:42 +02:00
20171010023049_add_foreign_key_to_account_moderation_notes.rb foreign_key, non-nullable, dependent: destroy in account_moderation_notes (#5294) 2017-10-10 13:12:17 +02:00
20171010025614_change_accounts_nonnullable_in_account_moderation_notes.rb foreign_key, non-nullable, dependent: destroy in account_moderation_notes (#5294) 2017-10-10 13:12:17 +02:00
20171020084748_add_visible_in_picker_to_custom_emoji.rb Feature: Unlisted custom emojis (#5485) 2017-10-27 16:11:30 +02:00
20171028221157_add_reblogs_to_follows.rb Lint pass (#8876) 2018-10-04 12:36:53 +02:00
20171107143332_add_memorial_to_accounts.rb Add ability to disable login and mark accounts as memorial (#5615) 2017-11-07 19:06:44 +01:00
20171107143624_add_disabled_to_users.rb Add ability to disable login and mark accounts as memorial (#5615) 2017-11-07 19:06:44 +01:00
20171109012327_add_moderator_to_accounts.rb Add moderator role and add pundit policies for admin actions (#5635) 2017-11-11 20:23:33 +01:00
20171114080328_add_index_domain_to_email_domain_blocks.rb Add uniqueness to block email domains (#5692) 2017-11-14 20:37:17 +01:00
20171114231651_create_lists.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
20171116161857_create_list_accounts.rb Lists (#5703) 2017-11-18 00:16:48 +01:00
20171118012443_add_moved_to_account_id_to_accounts.rb Profile redirect notes (#5746) 2017-11-18 19:39:02 +01:00
20171119172437_create_admin_action_logs.rb Add logging of admin actions (#5757) 2017-11-24 02:05:53 +01:00
20171122120436_add_index_account_and_reblog_of_id_to_statuses.rb Merge indexes for reblog on statuses table (#5831) 2017-11-27 20:22:27 +01:00
20171125024930_create_invites.rb Add consumable invites (#5814) 2017-11-27 16:07:59 +01:00
20171125031751_add_invite_id_to_users.rb Add consumable invites (#5814) 2017-11-27 16:07:59 +01:00
20171125185353_add_index_reblog_of_id_and_account_to_statuses.rb Merge indexes for reblog on statuses table (#5831) 2017-11-27 20:22:27 +01:00
20171125190735_remove_old_reblog_index_on_statuses.rb Merge indexes for reblog on statuses table (#5831) 2017-11-27 20:22:27 +01:00
20171129172043_add_index_on_stream_entries.rb Use disable_ddl_transaction! to prevent warnings on migration (#6183) 2018-01-04 19:38:29 +01:00
20171130000000_add_embed_url_to_preview_cards.rb Add embed_url to preview cards (#5775) 2017-12-07 03:37:43 +01:00
20171201000000_change_account_id_nonnullable_in_lists.rb Upgrade Doorkeeper to 4.4.1 (#8197) 2018-08-14 20:24:47 +02:00
20171212195226_remove_duplicate_indexes_in_lists.rb Remove duplicate indexes in lists (#5990) 2017-12-12 17:38:42 +01:00
20171226094803_more_faster_index_on_notifications.rb Use disable_ddl_transaction! to prevent warnings on migration (#6183) 2018-01-04 19:38:29 +01:00
20180106000232_add_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb add index on statuses for /api/v1/accounts/:account_id/statuses (#6202) 2018-01-09 15:00:19 +01:00
20180109143959_add_remember_token_to_users.rb pam authentication (#5303) 2018-02-02 10:18:55 +01:00
20180204034416_create_identities.rb CAS + SAML authentication feature (#6425) 2018-02-04 05:42:13 +01:00
20180206000000_change_user_id_nonnullable.rb Change user_id column non-nullable (#6435) 2018-02-07 16:35:44 +01:00
20180211015820_create_backups.rb Account archive download (#6460) 2018-02-21 23:21:32 +01:00
20180304013859_add_featured_collection_url_to_accounts.rb Federate pinned statuses over ActivityPub (#6610) 2018-03-04 09:19:11 +01:00
20180310000000_change_columns_in_notifications_nonnullable.rb Change columns in notifications nonnullable (#6764) 2018-03-24 12:51:28 +01:00
20180402031200_add_assigned_account_id_to_reports.rb Feature: Report improvements (#6967) (#7000) 2018-04-02 22:04:14 +02:00
20180402040909_create_report_notes.rb Feature: Report improvements (#6967) (#7000) 2018-04-02 22:04:14 +02:00
20180410204633_add_fields_to_accounts.rb Add bio fields (#6645) 2018-04-14 12:41:08 +02:00
20180416210259_add_uri_to_relationships.rb Store URIs of follows, follow requests and blocks for ActivityPub (#7160) 2018-05-04 21:14:34 +02:00
20180506221944_add_actor_type_to_accounts.rb Bot nameplates (#7391) 2018-05-07 09:31:07 +02:00
20180510214435_add_access_token_id_to_web_push_subscriptions.rb Add REST API for Web Push Notifications subscriptions (#7445) 2018-05-11 11:49:12 +02:00
20180510230049_migrate_web_push_subscriptions.rb Add REST API for Web Push Notifications subscriptions (#7445) 2018-05-11 11:49:12 +02:00
20180514130000_improve_index_on_statuses_for_api_v1_accounts_account_id_statuses.rb fix : Disable reverted index changes (#7871) 2018-06-21 23:07:40 +02:00
20180514140000_revert_index_change_on_statuses_for_api_v1_accounts_account_id_statuses.rb Fix index detection a migration to revert index change (#8026) 2018-07-15 14:56:00 +02:00
20180528141303_fix_accounts_unique_index.rb Fix FixAccountsUniqueIndex migration (#8212) 2018-08-15 20:23:12 +02:00
20180608213548_reject_following_blocked_users.rb Migration to cleanup blocked users that are still following (#7773) 2018-06-10 00:38:17 +02:00
20180609104432_migrate_web_push_subscriptions2.rb Migrate old web push subscriptions to ensure deliveries (#7764) 2018-06-09 13:33:04 +02:00
20180615122121_add_autofollow_to_invites.rb Add autofollow option to invites (#7805) 2018-06-15 18:00:23 +02:00
20180616192031_add_chosen_languages_to_users.rb Change language opt-out to language opt-in (#7823) 2018-06-17 13:54:02 +02:00
20180617162849_remove_unused_indexes.rb Remove unused indexes (#7829) 2018-06-17 18:49:35 +02:00
20180628181026_create_custom_filters.rb Keyword/phrase filtering (#7905) 2018-06-29 15:34:36 +02:00
20180707154237_add_whole_word_to_custom_filter.rb Add option to not consider word boundaries when processing keyword filtering (#7975) 2018-07-09 02:22:09 +02:00
20180711152640_create_relays.rb Add federation relay support (#7998) 2018-07-13 02:16:06 +02:00
20180808175627_create_account_pins.rb Public profile endorsements (accounts picked by profile owner) (#8146) 2018-08-09 09:56:53 +02:00
20180812123222_change_relays_enabled.rb Expect relays to answer with accept/reject (#8179) 2018-08-12 18:16:26 +02:00
20180812162710_create_status_stats.rb Move status counters to separate table, count replies (#8104) 2018-08-14 19:19:32 +02:00
20180812173710_copy_status_stats.rb Add fallback for PostgreSQL without upsert in CopyStatusStats (#8903) 2018-10-07 04:40:37 +02:00
20180814171349_add_confidential_to_doorkeeper_application.rb Upgrade Doorkeeper to 4.4.1 (#8197) 2018-08-14 20:24:47 +02:00
20180820232245_add_foreign_key_indices.rb Add missing indices for ON DELETE CASCADE constraints (#8332) 2018-08-21 20:11:34 +02:00
20180929222014_create_account_conversations.rb Add conversations API (#8832) 2018-10-07 23:44:58 +02:00
20181007025445_create_pghero_space_stats.rb Track historical space stats in PgHero to determine PostgreSQL growth (#8906) 2018-10-09 19:35:14 +02:00
20181010141500_add_silent_to_mentions.rb Improve support for aspects/circles (#8950) 2018-10-17 17:13:04 +02:00
20181017170937_add_reject_reports_to_domain_blocks.rb Add option to block reports from domain (#8830) 2018-10-20 08:02:44 +02:00
20181018205649_add_unread_to_account_conversations.rb Add unread indicator to conversations (#9009) 2018-10-19 01:47:29 +02:00
20181024224956_migrate_account_conversations.rb Remove progress estimate from MigrateAccountConversations (#9168) 2018-10-30 21:09:33 +01:00
20181026034033_remove_faux_remote_account_duplicates.rb Add locality check to ActivityPub::FetchRemoteAccountService (#9109) 2018-10-26 23:08:34 +02:00
20181116165755_create_account_stats.rb Extract counters from accounts table to account_stats table (#9295) 2018-11-19 00:43:52 +01:00
20181116173541_copy_account_stats.rb Extract counters from accounts table to account_stats table (#9295) 2018-11-19 00:43:52 +01:00
20181127130500_identity_id_to_bigint.rb Change identities id column to a bigint (#9371) 2018-11-27 13:56:25 +01:00
20181203003808_create_accounts_tags_join_table.rb Add profile directory (#9427) 2018-12-06 17:36:11 +01:00
20181203021853_add_discoverable_to_accounts.rb Add profile directory (#9427) 2018-12-06 17:36:11 +01:00
20181204193439_add_last_status_at_to_account_stats.rb Add profile directory (#9427) 2018-12-06 17:36:11 +01:00
20181204215309_create_account_tag_stats.rb Add profile directory (#9427) 2018-12-06 17:36:11 +01:00
20181207011115_downcase_custom_emoji_domains.rb Make custom emoji domains case insensitive #9351 (#9474) 2018-12-11 05:30:57 +01:00
20181213184704_create_account_warnings.rb Add moderation warnings (#9519) 2018-12-22 20:02:09 +01:00
20181213185533_create_account_warning_presets.rb Add moderation warnings (#9519) 2018-12-22 20:02:09 +01:00
20181219235220_add_created_by_application_id_to_users.rb Add REST API for creating an account (#9572) 2018-12-24 19:12:38 +01:00