diff --git a/backend/src/baserow/core/emails_context_types.py b/backend/src/baserow/core/emails_context_types.py index 75e02e142..1b7e862df 100644 --- a/backend/src/baserow/core/emails_context_types.py +++ b/backend/src/baserow/core/emails_context_types.py @@ -20,4 +20,5 @@ class CoreEmailContextType(EmailContextType): "baserow_embedded_share_hostname": settings.BASEROW_EMBEDDED_SHARE_HOSTNAME, "logo_url": settings.PUBLIC_WEB_FRONTEND_URL + "/img/logo.svg", "logo_additional_text": "", + "show_baserow_description": True, } diff --git a/backend/src/baserow/core/templates/baserow/core/notifications_summary.html b/backend/src/baserow/core/templates/baserow/core/notifications_summary.html index 27429a172..8b933197a 100644 --- a/backend/src/baserow/core/templates/baserow/core/notifications_summary.html +++ b/backend/src/baserow/core/templates/baserow/core/notifications_summary.html @@ -230,11 +230,15 @@ </tr> <!-- htmlmin:ignore -->{% endif %} <!-- htmlmin:ignore --> + <!-- htmlmin:ignore -->{% if show_baserow_description %} + <!-- htmlmin:ignore --> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} Baserow is an open source no-code database tool which allows you to collaborate on projects, customers and more. It gives you the powers of a developer without leaving your browser. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% endif %} + <!-- htmlmin:ignore --> </tbody> </table> </div> diff --git a/backend/src/baserow/core/templates/baserow/core/notifications_summary.mjml.eta b/backend/src/baserow/core/templates/baserow/core/notifications_summary.mjml.eta index 36a0b4f56..3e12064f7 100644 --- a/backend/src/baserow/core/templates/baserow/core/notifications_summary.mjml.eta +++ b/backend/src/baserow/core/templates/baserow/core/notifications_summary.mjml.eta @@ -31,12 +31,14 @@ {% endblocktrans %} </mj-text> <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> - <mj-text mj-class="text"> - {% blocktrans trimmed %} - Baserow is an open source no-code database tool which allows you to collaborate - on projects, customers and more. It gives you the powers of a developer without - leaving your browser. - {% endblocktrans %} - </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% if show_baserow_description %}<!-- htmlmin:ignore --></mj-raw> + <mj-text mj-class="text"> + {% blocktrans trimmed %} + Baserow is an open source no-code database tool which allows you to collaborate + on projects, customers and more. It gives you the powers of a developer without + leaving your browser. + {% endblocktrans %} + </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> </mj-column> </mj-section> diff --git a/backend/src/baserow/core/templates/baserow/core/user/account_deleted.html b/backend/src/baserow/core/templates/baserow/core/user/account_deleted.html index d6d13a41c..2bd8557c8 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/account_deleted.html +++ b/backend/src/baserow/core/templates/baserow/core/user/account_deleted.html @@ -181,11 +181,15 @@ <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed with baserow_embedded_share_hostname as baserow_embedded_share_hostname %} Your account ({{ username }}) on Baserow ({{ baserow_embedded_share_hostname }}) has been permanently deleted. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% if show_baserow_description %} + <!-- htmlmin:ignore --> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} Baserow is an open source no-code database tool which allows you to collaborate on projects, customers and more. It gives you the powers of a developer without leaving your browser. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% endif %} + <!-- htmlmin:ignore --> </tbody> </table> </div> diff --git a/backend/src/baserow/core/templates/baserow/core/user/account_deleted.mjml.eta b/backend/src/baserow/core/templates/baserow/core/user/account_deleted.mjml.eta index 880dbe0d4..1a3ce57f2 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/account_deleted.mjml.eta +++ b/backend/src/baserow/core/templates/baserow/core/user/account_deleted.mjml.eta @@ -10,12 +10,14 @@ deleted. {% endblocktrans %} </mj-text> - <mj-text mj-class="text"> - {% blocktrans trimmed %} - Baserow is an open source no-code database tool which allows you to collaborate - on projects, customers and more. It gives you the powers of a developer without - leaving your browser. - {% endblocktrans %} - </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% if show_baserow_description %}<!-- htmlmin:ignore --></mj-raw> + <mj-text mj-class="text"> + {% blocktrans trimmed %} + Baserow is an open source no-code database tool which allows you to collaborate + on projects, customers and more. It gives you the powers of a developer without + leaving your browser. + {% endblocktrans %} + </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> </mj-column> </mj-section> diff --git a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.html b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.html index c3cf014af..dfdcebe01 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.html +++ b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.html @@ -181,11 +181,15 @@ <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed with user.username as username and baserow_embedded_share_hostname as baserow_embedded_share_hostname %} Your account ({{ username }}) on Baserow ({{ baserow_embedded_share_hostname }}) was pending deletion, but you've logged in so this operation has been cancelled. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% if show_baserow_description %} + <!-- htmlmin:ignore --> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} Baserow is an open source no-code database tool which allows you to collaborate on projects, customers and more. It gives you the powers of a developer without leaving your browser. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% endif %} + <!-- htmlmin:ignore --> </tbody> </table> </div> diff --git a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.mjml.eta b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.mjml.eta index 5778d7929..fedefc2f0 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.mjml.eta +++ b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_cancelled.mjml.eta @@ -10,12 +10,14 @@ logged in so this operation has been cancelled. {% endblocktrans %} </mj-text> - <mj-text mj-class="text"> - {% blocktrans trimmed %} - Baserow is an open source no-code database tool which allows you to collaborate - on projects, customers and more. It gives you the powers of a developer without - leaving your browser. - {% endblocktrans %} - </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% if show_baserow_description %}<!-- htmlmin:ignore --></mj-raw> + <mj-text mj-class="text"> + {% blocktrans trimmed %} + Baserow is an open source no-code database tool which allows you to collaborate + on projects, customers and more. It gives you the powers of a developer without + leaving your browser. + {% endblocktrans %} + </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> </mj-column> </mj-section> diff --git a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.html b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.html index 1560ce300..bf792010e 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.html +++ b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.html @@ -186,11 +186,15 @@ <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} If you've changed your mind and want to cancel your account deletion, you just have to login again. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% if show_baserow_description %} + <!-- htmlmin:ignore --> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} Baserow is an open source no-code database tool which allows you to collaborate on projects, customers and more. It gives you the powers of a developer without leaving your browser. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% endif %} + <!-- htmlmin:ignore --> </tbody> </table> </div> diff --git a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.mjml.eta b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.mjml.eta index 0e9c2efa5..3a2e2201a 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.mjml.eta +++ b/backend/src/baserow/core/templates/baserow/core/user/account_deletion_scheduled.mjml.eta @@ -16,12 +16,14 @@ you just have to login again. {% endblocktrans %} </mj-text> - <mj-text mj-class="text"> - {% blocktrans trimmed %} - Baserow is an open source no-code database tool which allows you to collaborate - on projects, customers and more. It gives you the powers of a developer without - leaving your browser. - {% endblocktrans %} - </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% if show_baserow_description %}<!-- htmlmin:ignore --></mj-raw> + <mj-text mj-class="text"> + {% blocktrans trimmed %} + Baserow is an open source no-code database tool which allows you to collaborate + on projects, customers and more. It gives you the powers of a developer without + leaving your browser. + {% endblocktrans %} + </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> </mj-column> </mj-section> diff --git a/backend/src/baserow/core/templates/baserow/core/user/reset_password.html b/backend/src/baserow/core/templates/baserow/core/user/reset_password.html index 574841fda..985f0d46a 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/reset_password.html +++ b/backend/src/baserow/core/templates/baserow/core/user/reset_password.html @@ -204,11 +204,15 @@ <div style="font-family:Inter,sans-serif;font-size:12px;line-height:1;text-align:left;color:#9c9c9f;">{{ reset_url }}</div> </td> </tr> + <!-- htmlmin:ignore -->{% if show_baserow_description %} + <!-- htmlmin:ignore --> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} Baserow is an open source no-code database tool which allows you to collaborate on projects, customers and more. It gives you the powers of a developer without leaving your browser. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% endif %} + <!-- htmlmin:ignore --> </tbody> </table> </div> diff --git a/backend/src/baserow/core/templates/baserow/core/user/reset_password.mjml.eta b/backend/src/baserow/core/templates/baserow/core/user/reset_password.mjml.eta index 74fc44958..e917c0183 100644 --- a/backend/src/baserow/core/templates/baserow/core/user/reset_password.mjml.eta +++ b/backend/src/baserow/core/templates/baserow/core/user/reset_password.mjml.eta @@ -23,12 +23,14 @@ <mj-text mj-class="button-url"> {{ reset_url }} </mj-text> - <mj-text mj-class="text"> - {% blocktrans trimmed %} - Baserow is an open source no-code database tool which allows you to collaborate - on projects, customers and more. It gives you the powers of a developer without - leaving your browser. - {% endblocktrans %} - </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% if show_baserow_description %}<!-- htmlmin:ignore --></mj-raw> + <mj-text mj-class="text"> + {% blocktrans trimmed %} + Baserow is an open source no-code database tool which allows you to collaborate + on projects, customers and more. It gives you the powers of a developer without + leaving your browser. + {% endblocktrans %} + </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> </mj-column> </mj-section> diff --git a/backend/src/baserow/core/templates/baserow/core/workspace_invitation.html b/backend/src/baserow/core/templates/baserow/core/workspace_invitation.html index 18781212f..b9c96003c 100644 --- a/backend/src/baserow/core/templates/baserow/core/workspace_invitation.html +++ b/backend/src/baserow/core/templates/baserow/core/workspace_invitation.html @@ -208,11 +208,15 @@ <div style="font-family:Inter,sans-serif;font-size:12px;line-height:1;text-align:left;color:#9c9c9f;">{{ public_accept_url }}</div> </td> </tr> + <!-- htmlmin:ignore -->{% if show_baserow_description %} + <!-- htmlmin:ignore --> <tr> <td align="left" style="font-size:0px;padding:10px 25px;word-break:break-word;"> <div style="font-family:Inter,sans-serif;font-size:13px;line-height:170%;text-align:left;color:#070810;">{% blocktrans trimmed %} Baserow is an open source no-code database tool which allows you to collaborate on projects, customers and more. It gives you the powers of a developer without leaving your browser. {% endblocktrans %}</div> </td> </tr> + <!-- htmlmin:ignore -->{% endif %} + <!-- htmlmin:ignore --> </tbody> </table> </div> diff --git a/backend/src/baserow/core/templates/baserow/core/workspace_invitation.mjml.eta b/backend/src/baserow/core/templates/baserow/core/workspace_invitation.mjml.eta index 6bc8692ea..92ece4788 100644 --- a/backend/src/baserow/core/templates/baserow/core/workspace_invitation.mjml.eta +++ b/backend/src/baserow/core/templates/baserow/core/workspace_invitation.mjml.eta @@ -20,12 +20,14 @@ <mj-text mj-class="button-url"> {{ public_accept_url }} </mj-text> - <mj-text mj-class="text"> - {% blocktrans trimmed %} - Baserow is an open source no-code database tool which allows you to collaborate - on projects, customers and more. It gives you the powers of a developer without - leaving your browser. - {% endblocktrans %} - </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% if show_baserow_description %}<!-- htmlmin:ignore --></mj-raw> + <mj-text mj-class="text"> + {% blocktrans trimmed %} + Baserow is an open source no-code database tool which allows you to collaborate + on projects, customers and more. It gives you the powers of a developer without + leaving your browser. + {% endblocktrans %} + </mj-text> + <mj-raw><!-- htmlmin:ignore -->{% endif %}<!-- htmlmin:ignore --></mj-raw> </mj-column> </mj-section> diff --git a/backend/src/baserow/core/user/actions.py b/backend/src/baserow/core/user/actions.py index ecd106655..b70f4b70d 100644 --- a/backend/src/baserow/core/user/actions.py +++ b/backend/src/baserow/core/user/actions.py @@ -291,6 +291,11 @@ class SignInUserActionType(ActionType): auth_provider ).type + # This check must always be performed, even if the `log_signin_action` call is + # rate limited. + if user.profile.to_be_deleted: + UserHandler().cancel_user_deletion(user) + def log_signin_action(): handler.user_signed_in_via_provider(user, auth_provider) cls.register_action( diff --git a/changelog/entries/unreleased/feature/3066_hide_baserow_description_in_emails_if_logo_is_changed.json b/changelog/entries/unreleased/feature/3066_hide_baserow_description_in_emails_if_logo_is_changed.json new file mode 100644 index 000000000..0325ab5eb --- /dev/null +++ b/changelog/entries/unreleased/feature/3066_hide_baserow_description_in_emails_if_logo_is_changed.json @@ -0,0 +1,8 @@ +{ + "type": "feature", + "message": "Hide Baserow description in all emails if logo is changed.", + "domain": "core", + "issue_number": 3066, + "bullet_points": [], + "created_at": "2025-03-06" +} diff --git a/enterprise/backend/src/baserow_enterprise/emails_context_types.py b/enterprise/backend/src/baserow_enterprise/emails_context_types.py index e5ccb2981..73185ba1e 100644 --- a/enterprise/backend/src/baserow_enterprise/emails_context_types.py +++ b/enterprise/backend/src/baserow_enterprise/emails_context_types.py @@ -27,5 +27,6 @@ class EnterpriseEmailContextType(EmailContextType): ): email_context["logo_url"] = UserFileSerializer(custom_logo).data["url"] email_context["logo_additional_text"] = "by Baserow" + email_context["show_baserow_description"] = False return email_context diff --git a/enterprise/web-frontend/modules/baserow_enterprise/locales/en.json b/enterprise/web-frontend/modules/baserow_enterprise/locales/en.json index 75df26121..1d851464b 100644 --- a/enterprise/web-frontend/modules/baserow_enterprise/locales/en.json +++ b/enterprise/web-frontend/modules/baserow_enterprise/locales/en.json @@ -340,7 +340,7 @@ "showBaserowHelpMessageDescription": "Indicates whether the help request message should be shown on the dashboard.", "deactivated": "Available in enterprise", "coBrandingLogo": "Logo", - "coBrandingLogoDescription": "Replaces the Baserow logo for a custom co-branded alternative (176x29).", + "coBrandingLogoDescription": "Replaces the Baserow logo for a custom co-branded alternative (176x29). If set, it also removes the Baserow description in the footer of all emails.", "uploadFileButton": "Upload image" }, "enterpriseModal": {