Merge pull request #15302 from overleaf/mf-fix-unlink-github-sync-behaviour

[web] Unlink github from collaborators when project owner unsubcribes and github feature was lost

GitOrigin-RevId: 81b81cfb75e3a3684e185ef13d8c0aca19d5699d
This commit is contained in:
M Fahru 2024-01-29 13:23:03 -07:00 committed by Copybot
parent 00d66a1b81
commit f0247a3311
10 changed files with 28 additions and 10 deletions

View file

@ -59,6 +59,16 @@ async function refreshFeatures(userId, reason) {
logger.error(err)
}
}
if (oldFeatures.github === true && features.github === false) {
logger.debug({ userId }, '[FeaturesUpdater] must unlink github')
try {
await Modules.promises.hooks.fire('removeGithub', userId, reason)
} catch (err) {
logger.error(err)
}
}
return { features: newFeatures, featuresChanged }
}

View file

@ -81,9 +81,12 @@
"are_you_getting_an_undefined_control_sequence_error": "",
"are_you_still_at": "",
"are_you_sure": "",
"ask_proj_owner_to_unlink_from_current_github": "",
"ask_proj_owner_to_upgrade_for_full_history": "",
"ask_proj_owner_to_upgrade_for_longer_compiles": "",
"ask_proj_owner_to_upgrade_for_references_search": "",
"ask_repo_owner_to_reconnect": "",
"ask_repo_owner_to_renew_overleaf_subscription": "",
"auto_close_brackets": "",
"auto_compile": "",
"auto_complete": "",
@ -447,9 +450,9 @@
"github_credentials_expired": "",
"github_empty_repository_error": "",
"github_file_name_error": "",
"github_for_link_shared_projects": "",
"github_git_folder_error": "",
"github_integration_lowercase": "",
"github_is_no_longer_connected": "",
"github_is_premium": "",
"github_large_files_error": "",
"github_merge_failed": "",
@ -1298,6 +1301,8 @@
"to_add_more_collaborators": "",
"to_change_access_permissions": "",
"to_confirm_transfer_enter_email_address": "",
"to_fix_this_you_can": "",
"to_fix_this_you_can_ask_the_github_repository_owner": "",
"to_insert_or_move_a_caption_make_sure_tabular_is_directly_within_table": "",
"to_modify_your_subscription_go_to": "",
"to_use_text_wrapping_in_your_table_make_sure_you_include_the_array_package": "",
@ -1402,6 +1407,7 @@
"unlink_provider_account_title": "",
"unlink_provider_account_warning": "",
"unlink_reference": "",
"unlink_the_project_from_the_current_github_repo": "",
"unlink_warning_reference": "",
"unlinking": "",
"unmerge_cells": "",
@ -1522,6 +1528,7 @@
"you_need_to_configure_your_sso_settings": "",
"you_will_be_able_to_reassign_subscription": "",
"youll_get_best_results_in_visual_but_can_be_used_in_source": "",
"youll_need_to_ask_the_github_repository_owner": "",
"youll_no_longer_need_to_remember_credentials": "",
"your_affiliation_is_confirmed": "",
"your_browser_does_not_support_this_feature": "",

View file

@ -23,6 +23,7 @@ const ProjectContext = createContext<
versioning?: boolean
gitBridge?: boolean
referencesSearch?: boolean
github?: boolean
}
publicAccessLevel?: PublicAccessLevel
owner: {

View file

@ -579,7 +579,6 @@
"github_commit_message_placeholder": "Commit besked for ændringer i __appName__...",
"github_credentials_expired": "Dine GitHub autentificeringsoplysninger er udløbet",
"github_file_name_error": "Dette repository kan ikke importeres, fordi det indeholder en eller flere filer med et ugyldigt filnavn:",
"github_for_link_shared_projects": "Du har adgang til dette projekt via link-deling, og vil ikke blive synkroniseret med GitHub, medmindre du bliver inviteret via e-mail af projektejeren.",
"github_git_and_dropbox_integrations": "<0>GitHub</0>-, <0>Git</0>- og <0>Dropbox</0>-integrationer",
"github_git_folder_error": "Dette projekt indeholder en .git mappe i den yderste mappe, hvilket indikerer at det allerede er et Git repository. Overleaf GitHub synkroniseringen kan ikke synkronisere Git historikker. Fjern venligst .git mappen og prøv igen.",
"github_integration_info": "Push og pull commits til og fra Github eller direkte fra Git, so dig og dine samarbejdspartnere kan arbejde offline med Git og online med Overleaf.",

View file

@ -585,7 +585,6 @@
"github_credentials_expired": "Deine GitHub-Autorisierungsschlüssel sind abgelaufen",
"github_empty_repository_error": "Es sieht so aus, als sei dein GitHub-Repository leer oder noch nicht verfügbar. Erstelle eine neue Datei auf GitHub.com und versuche es erneut.",
"github_file_name_error": "Dein Projekt kann nicht importiert werden, da es eine oder mehrere Dateien mit ungültigen Dateinamen enthält:",
"github_for_link_shared_projects": "Auf dieses Projekt wurde über Linkfreigabe zugegriffen und es wird nicht mit deinem GitHub synchronisiert, es sei denn, du wirst vom Projektinhaber per E-Mail eingeladen.",
"github_git_and_dropbox_integrations": "<0>GitHub-</0>, <0>Git-</0> und <0>Dropbox-</0>Integrationen",
"github_git_folder_error": "Dieses Projekt enthält auf der obersten Ebene einen .git-Ordner, was darauf hinweist, dass es sich bereits um ein Git-Repository handelt. Der GitHub-Synchronisierungsdienst von Overleaf kann keine Git-Verläufe synchronisieren. Bitte entferne den .git-Ordner and versuche es erneut.",
"github_integration_info": "Nutze Push und Pull von Commits zu und von GitHub oder direkt von Git, sodass du oder deine Mitarbeiter offline mit Git und online mit Overleaf arbeiten können.",

View file

@ -129,9 +129,12 @@
"articles": "Articles",
"as_a_member_of_sso_required": "As a member of <b>__institutionName__</b>, you must log in to <b>__appName__</b> through your institution.",
"ascending": "Ascending",
"ask_proj_owner_to_unlink_from_current_github": "Ask the owner of the project (<0>__projectOwnerEmail__</0>) to unlink the project from the current GitHub repository and create a connection to a different repository.",
"ask_proj_owner_to_upgrade_for_full_history": "Please ask the project owner to upgrade to access this projects full history.",
"ask_proj_owner_to_upgrade_for_longer_compiles": "Please ask the project owner to upgrade to increase the timeout limit.",
"ask_proj_owner_to_upgrade_for_references_search": "Please ask the project owner to upgrade to use the References Search feature.",
"ask_repo_owner_to_reconnect": "Ask the GitHub repository owner (<0>__repoOwnerEmail__</0>) to reconnect the project.",
"ask_repo_owner_to_renew_overleaf_subscription": "Ask the GitHub repository owner (<0>__repoOwnerEmail__</0>) to renew their __appName__ subscription and reconnect the project.",
"august": "August",
"author": "Author",
"auto_close_brackets": "Auto-close Brackets",
@ -694,11 +697,11 @@
"github_credentials_expired": "Your GitHub authorization credentials have expired",
"github_empty_repository_error": "It looks like your GitHub repository is empty or not yet available. Create a new file on GitHub.com then try again.",
"github_file_name_error": "This repository cannot be imported, because it contains file(s) with an invalid filename:",
"github_for_link_shared_projects": "This project was accessed via link-sharing and wont be synchronised with your GitHub unless you are invited via e-mail by the project owner.",
"github_git_and_dropbox_integrations": "<0>Github</0>, <0>Git</0> and <0>Dropbox</0> integrations",
"github_git_folder_error": "This project contains a .git folder at the top level, indicating that it is already a git repository. The Overleaf GitHub sync service cannot sync git histories. Please remove the .git folder and try again.",
"github_integration_info": "Push and pull commits to and from GitHub or directly from Git, so you or your collaborators can work offline with Git and online with Overleaf.",
"github_integration_lowercase": "Git and GitHub integration",
"github_is_no_longer_connected": "GitHub is no longer connected to this project.",
"github_is_premium": "GitHub Sync is a premium feature",
"github_large_files_error": "Merge failed: your GitHub repository contains files over the 50mb file size limit ",
"github_merge_failed": "Your changes in __appName__ and GitHub could not be automatically merged. Please manually merge the <0>__sharelatex_branch__</0> branch into the default branch in git. Click below to continue, after you have manually merged.",
@ -1909,6 +1912,8 @@
"to_add_more_collaborators": "To add more collaborators or turn on link sharing, please ask the project owner",
"to_change_access_permissions": "To change access permissions, please ask the project owner",
"to_confirm_transfer_enter_email_address": "To accept the invitation, enter the email address linked to your account.",
"to_fix_this_you_can": "To fix this, you can:",
"to_fix_this_you_can_ask_the_github_repository_owner": "To fix this, you can ask the GitHub repository owner (<0>__repoOwnerEmail__</0>) to renew their __appName__ subscription and reconnect the project.",
"to_insert_or_move_a_caption_make_sure_tabular_is_directly_within_table": "To insert or move a caption, make sure \\begin{tabular} is directly within a table environment",
"to_many_login_requests_2_mins": "This account has had too many login requests. Please wait 2 minutes before trying to log in again",
"to_modify_your_subscription_go_to": "To modify your subscription go to",
@ -2024,13 +2029,14 @@
"unlink": "Unlink",
"unlink_dropbox_folder": "Unlink Dropbox Account",
"unlink_dropbox_warning": "Any projects that you have synced with Dropbox will be disconnected and no longer kept in sync with Dropbox. Are you sure you want to unlink your Dropbox account?",
"unlink_github_repository": "Unlink GitHub Repository",
"unlink_github_repository": "Unlink GitHub repository",
"unlink_github_warning": "Any projects that you have synced with GitHub will be disconnected and no longer kept in sync with GitHub. Are you sure you want to unlink your GitHub account?",
"unlink_linked_accounts": "Unlink any linked accounts (such as ORCID ID, IEEE). <0>Remove them in Account Settings (under Linked Accounts).</0>",
"unlink_linked_google_account": "Unlink your Google account. <0>Remove it in Account Settings (under Linked Accounts).</0>",
"unlink_provider_account_title": "Unlink __provider__ Account",
"unlink_provider_account_warning": "Warning: When you unlink your account from __provider__ you will not be able to sign in using __provider__ anymore.",
"unlink_reference": "Unlink References Provider",
"unlink_the_project_from_the_current_github_repo": "Unlink the project from the current GitHub repository and create a connection to a repository you own. (You need an active __appName__ subscription to set up a GitHub Sync).",
"unlink_warning_reference": "Warning: When you unlink your account from this provider you will not be able to import references into your projects.",
"unlinking": "Unlinking",
"unmerge_cells": "Unmerge cells",
@ -2198,6 +2204,7 @@
"you_will_be_able_to_contact_us_any_time_to_share_your_feedback": "<0>You will be able to contact us</0> any time to share your feedback",
"you_will_be_able_to_reassign_subscription": "You will be able to reassign their subscription membership to another person in your organization",
"youll_get_best_results_in_visual_but_can_be_used_in_source": "Youll get the best results from using this tool in the <0>Visual Editor</0>, although you can still use it to insert tables in the <1>Code Editor</1>. Once youve selected the number of rows and columns you need, the table will appear in your document and you can double click in a cell to add contents to it.",
"youll_need_to_ask_the_github_repository_owner": "Youll need to ask the GitHub repository owner (<0>__repoOwnerEmail__</0>) to reconnect the project.",
"youll_no_longer_need_to_remember_credentials": "Youll no longer need to remember a separate email address and password. Instead, you will use single-sign on to login to Overleaf. <0>Read more about SSO</0>.",
"your_account_is_managed_by_admin_cant_join_additional_group": "Your __appName__ account is managed by your current group admin (__admin__). This means you cant join additional group subscriptions. <0>Read more about Managed Users.</0>",
"your_affiliation_is_confirmed": "Your <0>__institutionName__</0> affiliation is confirmed.",

View file

@ -359,7 +359,6 @@
"git_bridge_modal_description": "Vous pouvez effectuer un git clone de votre projet en utilisant le lien ci-dessous.",
"github_commit_message_placeholder": "Message de commit pour les changements effectués dans __appName__…",
"github_credentials_expired": "Vos identifiants GitHub ont expiré",
"github_for_link_shared_projects": "Vous avez accédé à ce projet par un partage de lien : celui-ci ne sera pas synchronisé à votre GitHub tant que vous naurez pas été invité par courriel par le propriétaire du projet.",
"github_git_folder_error": "Ce projet contient un répertoire .git à sa racine, ce qui indique quil sagit déjà dun dépôt Git. Le service de synchronisation GitHub dOverleaf nest pas en mesure de synchroniser les historiques Git. Veuillez supprimer le répertoire .git et réessayer.",
"github_integration_info": "Poussez et tirez des commits vers et depuis GitHub, ou directement depuis Git, permettant ainsi à vous et vos collaborateur·rice·s de travailler hors connexion avec Git ou en ligne sur Overleaf.",
"github_integration_lowercase": "Intégration avec Git et GitHub",

View file

@ -257,7 +257,6 @@
"git_bridge_modal_description": "Você pode usar git clone no seu projeto usando o link abaixo.",
"github_commit_message_placeholder": "Mensagem de commit para as alterações feitas no __appName__...",
"github_credentials_expired": "Suas credenciais de autorização do GitHub expiraram",
"github_for_link_shared_projects": "Este projeto foi acessado por meio do compartilhamento de links e não será sincronizado com o seu Github, a menos que você seja convidado por e-mail pelo proprietário do projeto.",
"github_integration_info": "Enviar e baixe suas alterações do GitHub, assim você e seus colaboradores podem trabalhar offline com o git e online com o Overleaf.",
"github_integration_lowercase": "Integração com GitHub",
"github_is_premium": "Sincronizar com GitHub é um recurso premium",

View file

@ -363,7 +363,6 @@
"get_started_now": "Börja redan nu",
"github_commit_message_placeholder": "Commit meddelande för ändringar gjorda i __appName__...",
"github_credentials_expired": "Din auktorisering för GitHub har löpt ut",
"github_for_link_shared_projects": "Det här projektet har nåtts via länkdelning och kommer inte att synkroniseras med din GitHub om inte projektägaren bjuder in dig via e-post.",
"github_integration_info": "Hämta och tryck upp ändringar till och från GitHub, så att dina samarbetspartners kan jobba offline med git och online med __appName__.",
"github_integration_lowercase": "GitHubintegration",
"github_is_premium": "GitHub synk är en premium funktion",

View file

@ -689,8 +689,6 @@
"github_commit_message_placeholder": "为 __appName__ 中的更改提交信息",
"github_credentials_expired": "您的 Github 授权凭证已过期",
"github_empty_repository_error": "您的 GitHub 存储库似乎为空或尚不可用。 在 GitHub.com 上创建一个新文件,然后重试。",
"github_file_name_error": "无法导入此存储库,因为它包含文件名无效的文件:",
"github_for_link_shared_projects": "此项目是通过链接共享访问的除非项目所有者通过电子邮件邀请您否则不会与您的Github同步。",
"github_git_and_dropbox_integrations": "<0>Github</0>, <0>Git</0> 与 <0>Dropbox</0> 集成",
"github_git_folder_error": "此项目在顶层包含一个.git文件夹表示它已经是git存储库。Overleaf的Github同步服务无法同步git历史记录。请删除.git文件夹然后重试。",
"github_integration_info": "与GitHub或直接从Git进行提交和拉取提交因此您或您的合作者可以在Git上脱机工作并在Overleaf上在线工作。",