Commit graph

122 commits

Author SHA1 Message Date
Akhil Narang
0cd2f9ef05
fix: jinja template had missing }} (#33541)
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2025-08-05 11:56:33 +00:00
Elton Lobo
6d1008933f
feat: add user invitation doctype & related public methods (#33308)
* feat: add user invitation doctype & related public methods

* style(user-invitation): execute formatters & add semgrep comments

* refactor(user-invitation): use `is` to compare `None` values

* fix(user-invitation): skip fetching `after_accept` for default app

* fix(user-invitation): translate email templates

* fix(user-invitaton): return pending invites from invite by email api

* refactor(user-invitation): improve code quality

* fix(user-invitation): translate all error messages

* refactor(user-invitation): improve security & readability

Improvements:
- move invite expiration check to `daily_maintenance`
- explicitly import all of the used packages
- specify methods for all security-critical endpoints
- improve error messages and give them suitable titles
- remove unnecessary utility functions
- make invitation key management secure
- translate all of the subjects of the sent emails
- use the `app_title` hook to create email titles
- commit the work done after each iteration of the background invitation
  expiry checker
- restructure code to improve readability
- use `user.reset_password` to generate the target link
- use clear long names to name identifiers
- add document states with relevant colors (User Invitation doctype)
- differ `sendmail` emails whenever possible
- send an email to the invitation creator instead of the invitee after
  the invite has expired
- remove `User Invitation Manager` role

* fix(user-invitation): use valid emails to test doctype & related code

* feat(user-invitation): support adding multiple roles

* refactor(user-invitation): mark relevant fields `set only once`

* feat(user-invitation): add `Cancelled` status

* test(user-invitation): correct broken tests

* test(user-invitation): form valid f-strings & run code formatter

* feat(user-invitation): make doctype usable from desk

* fix(user-invitation): remove delete permission from invitation doctype

* feat(user-invitation): pass user inserted info to `after_accept` hook

* refactor(user-invitation): improve custom action methods & errors

Improvements:
- trigger actions only when the invitation is in the `Pending` state
- use lowercase letters to start error messages
- handle cases where `user_invitation_hook` is not defined

* refactor(user-invitation): remove site name from email templates

* docs(user-invitation): add internal documentation

* feat(user-invitation): add 'get pending' & cancel invites apis

* fix(user-invitation): make invitation app specific

* refactor(user-invitation): avoid mixing function programming

* fix(user-invitation): make apis usable for app specific valid users

* fix(user-invitation): allow app specific invites

* feat(user-invitation): make list view & permission checks app specific

* refactor(user-invitation): convert class methods to static when possible

* feat(user-invitation): add `app_only_for` method to the doc

* fix(user-invitation): f-string syntax error in `get_permission_query_conditions`

* docs(user-invitation): add examples & improve the internal doc

* refactor: rename method name

static_ is unnecessary
only_for doesn't make sense in this context when arguments are not roles

* fix: Support POST request too

We dont follow REST semantics 100%, anything that modifies something
should ideally be doable with POST too.

* chore: cap

* fix: Avoid ignore_permissions as user arg

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2025-07-28 16:25:53 +05:30
Ernesto Ruiz
57067b9af7
chore: add translation function to file_backup_notification template (#33231) 2025-07-07 11:28:05 +05:30
sokumon
32a87f53d6 fix: delete newsletter related files 2025-06-18 16:23:36 +05:30
Corentin Forler
26b279864f
fix: Fix link in delete data confirmation email template (#32544) 2025-05-16 10:00:20 +05:30
Corentin Forler
35d557f46d
chore: remove empty template (#32543) 2025-05-16 09:58:45 +05:30
Ankush Menat
66e91445f5 fix: remove eps template 2025-04-23 12:05:01 +05:30
Faris Ansari
4eafaea3e7 fix: remove text align justify from newsletter 2024-12-09 16:59:33 +05:30
Rushabh Mehta
c2652fed39 fix(minor): page creation 2024-09-06 14:12:34 +05:30
Gursheen Anand
3491f9d88a chore: add warning for workflow actions email 2024-07-15 20:21:22 +05:30
Rutwik Hiwalkar
a73e65581d
fix: disabled user login from login via link feature (#26134)
* fix(ui): button color for login via link template

- blue > black

* fix: restrict login via link for disabled users

* fix: validate user on session.resume
2024-04-24 15:49:17 +05:30
Psyi Rius
c3db5fca23
fix: typo in jinja2 templates (#22353) 2023-09-12 09:43:17 +05:30
Shariq Ansari
a6db8ab5bc fix: removed footer
Capitalized log in to frappe button
2022-12-26 12:19:55 +05:30
Shariq Ansari
8dad07949a chore: again renaming to Login with email link 2022-12-20 21:53:13 +05:30
Shariq Ansari
83bf33c1fc fix: renamed login without password to passwordless login
made text translatable in email template
2022-12-20 16:14:46 +05:30
Shariq Ansari
60c29b6939 fix: removed logo implementation 2022-12-20 13:54:40 +05:30
Shariq Ansari
570442865b feat: Login without password (through link sent on email) 2022-12-20 13:00:23 +05:30
Faris Ansari
151a95aa30 fix: remove spaces from email placeholders
spaces get converted to %20 which breaks text replacement
2022-04-04 17:11:14 +05:30
Gavin D'souza
0ef99c3886 fix: Add signature to Communication.content if not already added
This fix adds a signature forcibly if found under the sender's
User.email_signature or default outgoing email account's signature
field.

The previous method of adding a comment into the Email didn't work since
Quill would discard comments before setting them. Adding signatures in
get_formatted_html didn't seem apt since it's used in QueueBuilder to
re-construct the Email before processing the Email Queue. This meant
that the email content that was added in the Communication record would
not be final. Now, we treat the signature as part of the Communication
content.
2022-03-02 19:41:51 +05:30
Suraj Shetty
dfebbe9529
Merge branch 'develop' into data-deletion-enhancements 2021-12-12 10:14:44 +05:30
Faris Ansari
ccc65defb6 fix(newsletter): better open in web link 2021-12-07 17:20:58 +05:30
Jannat Patel
abd6eafbad fix: email content 2021-12-01 19:44:19 +05:30
Jannat Patel
121333874a fix: send email immediately 2021-12-01 18:54:01 +05:30
Jannat Patel
d622b96e64 fix: request for account deletion flow 2021-12-01 10:54:15 +05:30
barredterra
1c410de6f5 fix: "send open in web" only if enabled 2021-11-23 12:45:28 +01:00
Ankush Menat
d41121643e
fix: broken template in password reset 2021-08-17 15:59:12 +05:30
pateljannat
5b92c3d18d style: added margin 2021-02-24 16:46:26 +05:30
pateljannat
5fb2f74bb6 fix: newsletter template content 2021-02-22 17:09:49 +05:30
pateljannat
0ab1f5f7f8 feat: newsletter email template 2021-02-22 15:01:06 +05:30
Jannat Patel
5e30d54bfb
Merge branch 'develop' into newsletter-modifications 2021-02-22 14:38:30 +05:30
pateljannat
4624e31708 fix: removed changes from queue.py 2021-02-22 14:35:45 +05:30
pateljannat
01aa5ff928 feat: newsletter modifications 2021-01-22 18:04:02 +05:30
Suraj Shetty
37e54c3512 fix: Remove fallback title for brand logo 2021-01-21 15:45:00 +05:30
Suraj Shetty
927b62f39e fix: Email body spacing issue 2021-01-21 15:33:12 +05:30
Suraj Shetty
5045cdf092 fix: Get brand logo from email account 2021-01-21 11:31:13 +05:30
Suraj Shetty
e6aa5394b8 feat: Add avatars for top performers 2021-01-21 11:18:59 +05:30
Suraj Shetty
e6f551d610 feat: Add with_container argument and update email style 2021-01-21 11:17:08 +05:30
Suraj Shetty
d2b5bd7af7 refactor: Fix address naming 2021-01-21 10:13:19 +05:30
Suraj Shetty
397848f9f7 fix: Email new notification style 2021-01-19 17:37:05 +05:30
Suraj Shetty
3751769c41 fix: Add alt and title to brand logo 2021-01-15 15:29:26 +05:30
Suraj Shetty
5dedbc0889 fix: Update energy points summary style 2021-01-13 15:58:07 +05:30
Suraj Shetty
fbeb71420e fix: Update new-user email template style 2021-01-13 14:41:51 +05:30
Suraj Shetty
03abe4abeb fix: Get brand logo from app 2021-01-13 14:03:54 +05:30
Suraj Shetty
7e4bc4d9b3 fix: Update workflow action email template style 2021-01-13 10:38:35 +05:30
Suraj Shetty
607b5f8eb4 refactor: Move verification code email msg to template 2021-01-13 10:36:49 +05:30
Suraj Shetty
5e63531ba8 feat: Update standard email template to match new style 2021-01-13 10:34:16 +05:30
prssanna
42a7ee190a fix: fix notification email template 2020-06-18 14:06:50 +05:30
Suraj Shetty
284c70809b fix: Translatable strings with trailing spaces 2020-04-08 14:20:52 +05:30
Suraj Shetty
dee4a7336c fix(translations): Incorrect syntax 2020-01-29 15:22:35 +05:30
Suraj Shetty
d5b08ca36f fix: Use _ for translation since frappe._ is not supported 2020-01-01 09:29:12 +05:30