Commit graph

810 commits

Author SHA1 Message Date
Ankush Menat
db3e4c9cfc
fix: Check if note has permission (#22750) 2023-10-16 16:43:47 +05:30
barredterra
ed2290d1d6 Merge branch 'develop' into feat/improve-openid-connect-devx 2023-10-07 15:22:59 +02:00
Ankush Menat
d7a9d0111c
perf: lazy load SVG icons (#22517)
| Metric                             | Before | After | Change    |
| ---                                | ---    | ---   | ---       |
| app.html first response size       | 421kb  | 106kb | -75% (!)  |
| First response duration            | 60ms   | 40ms  | -33%      |

huge thanks to @cogk for doing most of the work for this PR on this issue: https://github.com/frappe/frappe/issues/17449#issuecomment-1728328726

Co-authored-by: Corentin Flr <10946971+cogk@users.noreply.github.com>
2023-09-23 15:13:43 +05:30
Ankush Menat
8635daf425
fix: duplicate icons (#22516) 2023-09-23 12:51:20 +05:30
Ankush Menat
59d1eefa61 refactor: move unhandled email to log settings 2023-09-23 11:23:53 +05:30
Corentin Flr
41d30e7213
feat: Add custom icons with the app_include_icons hook (#22254)
* feat: Add custom icons with the `app_include_icons` hook

These custom icons are available on the desk only. They can be picked in the `ControlIcon` picker.

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>

* fix: skip conf for including icons

* test: Fix test_include_icons

---------

Co-authored-by: Abraham Kalungi <85731451+kalungia@users.noreply.github.com>
Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-09-20 20:23:17 +05:30
David Arnold
64a09be958
Merge branch 'develop' into feat/improve-openid-connect-devx 2023-09-16 09:58:53 +02:00
David Arnold
5e7ff1c81d
fix: add well-known openid-configuration redirect 2023-09-16 09:52:45 +02:00
Ankush Menat
530c47ffe5
feat: after_response callback manager (#22398)
* feat: `after_response` callback manager

* perf: defer closing DB connection

* refactor: simplify after response hooks

* wip

* example usage

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>

* fix: Log request end if not already

---------

Co-authored-by: Sagar Vora <sagar@resilient.tech>
2023-09-14 10:56:08 +00:00
Ankush Menat
8176b86b25 fix: notification_settings has_permission hooks 2023-08-29 13:26:48 +05:30
barredterra
68d984dbb2 fix(Assignment Rule): run on additional events
- on_cancel
- on_update_after_submit
2023-08-17 13:10:03 +02:00
barredterra
63aded91f9 Revert "fix: run assignment rule on change"
This reverts commit 88cbba5f21.
2023-08-17 13:02:41 +02:00
barredterra
88cbba5f21 fix: run assignment rule on change 2023-08-15 14:01:40 +02:00
Ankush Menat
16aa414fda fix: flush telemetry before ending background job 2023-08-12 12:13:59 +05:30
Ankush Menat
0bc5d1dc3b feat(DX): type annotated python controllers 2023-07-24 15:32:46 +05:30
Deepesh Garg
e38078a69f
test: Patch hooks for testing (#21702)
* test: Patch hooks for testing

* test: hooks patcher

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-07-17 12:41:27 +05:30
Ankush Menat
8f552b8fe2
Merge pull request #21695 from ankush/perf/desk_requests
perf(desk): reduce unnecessary requests on first load
2023-07-16 13:06:16 +05:30
Deepesh Garg
e32e74f2f1
feat: Custom naming series parser via hooks (#21690)
* feat: Custom naming series parser via hooks

* chore: use assignment operatot

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>

* test: Unit test for custom parser

* test: Unit test for custom parser

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-07-16 12:57:40 +05:30
Ankush Menat
b919618032 perf: eliminate request for user permissions
This is ALWAYS required, then it can just be part of boot. Eliminates 1
unnecessary request.
2023-07-16 12:43:43 +05:30
Ankush Menat
2e8ea02028 fix: Expire stalled reports
Mark any report that take more than 60 minutes as failed
2023-07-01 18:27:25 +05:30
Ankush Menat
b9f000e1f9 refactor!: Log 5xx error to error log instead of error snapshot
Also move log_error function to right location
2023-06-28 10:59:19 +05:30
Suraj Shetty
0334e91db7
Merge branch 'develop' into file-permissions 2023-06-14 15:42:49 +05:30
Ankush Menat
4bf1139427 chore: remove get_shade usage
This function doesn't do anything
2023-06-13 16:00:43 +05:30
phot0n
1f8598891e fix: remove infinite sending retries for certain exceptions for email queue
* chore: remove expired status & set_expiry job from email queue
2023-06-09 14:38:55 +05:30
Raffael Meyer
01d8a4ab28
Merge branch 'develop' into file-permissions 2023-06-08 18:21:23 +02:00
Ankush Menat
af3213a445
fix: offset log cleanup to avoid deadlocks (#21105)
- Email queue is cleared at midnight
- Another worker at same time might be email Email

This causes random failures almost daily
2023-05-24 18:13:16 +05:30
Marica
3d02db7c1e
Merge branch 'develop' into file-permissions 2023-05-22 12:53:22 +05:30
Suraj Shetty
bd737d3616
Merge branch 'develop' into fix-note-2 2023-05-16 07:53:15 +05:30
Shadrak Gurupnor
d9b2d23ec3
feat: track skipped patch with traceback (#20931)
* feat: track skipped patch with traceback

* fix: dump all the patches in patch log

* fix: check non-skipped patches

* fix: print traceback if failed && reload patch_log before migrate

* chore: dont force patch log reload

* chore: remove unnecessary checks

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2023-05-10 18:44:40 +05:30
barredterra
2ef5e6bd1d fix: file permissions 2023-05-02 17:40:09 +02:00
Ankush Menat
87a88195ec feat: telemetry using posthog 2023-04-25 10:33:28 +05:30
barredterra
bc287ab857 feat: permission query for Note 2023-04-24 16:18:38 +02:00
barredterra
150d677a28 Merge remote-tracking branch 'upstream/develop' into fix-note-2 2023-04-24 15:55:02 +02:00
Maharshi Patel
1bae6a2b0b
feat: hooks added for print formats / pdf. (#20734) 2023-04-17 19:03:53 +05:30
Suraj Shetty
3028918f98
Merge branch 'develop' into fix-note-2 2023-04-17 13:19:48 +05:30
Ritwik Puri
ac351166b2
fix: pull from email account every 10 mins instead of 4 mins (by default) (#20675) 2023-04-13 12:36:14 +05:30
Raffael Meyer
b84ab9de87
Merge branch 'develop' into fix-note-2 2023-02-24 12:13:58 +01:00
Ankush Menat
34beb65009
fix: link webhook logs with webhook document (#20155) 2023-02-24 16:30:29 +05:30
Ankush Menat
e7f604ef48 refactor: rename DocReminder -> Reminder 2023-02-24 13:47:58 +05:30
Ankush Menat
73cd823a0a feat: Document Reminders
There is `Notification` doctype but it doesn't work so well for small
one-off reminders. Imagine these scenarios:

1. Remind me to follow up on this lead in 5 days.
2. Remind me to revoke temporary access I am giving to this user.

For such scenarios, I am proposing a simple reminder system built into
framework. All it does is:

1. For any document you can set a reminder with time and message.
2. When time comes you'll get a system notification with message and
   link to the document.

Permissions:
1. Users can only see their own set reminders.
2023-02-24 12:40:54 +05:30
Raffael Meyer
97dde45067
Merge branch 'develop' into fix-note-2 2023-02-17 11:04:26 +01:00
Gavin D'souza
fe26c542b7 refactor: Move before/after tasks as hooks
Moved before/after tasks in Requests as hooks for:
- monitor
- rate_limiter
- recorder

Moved before/after tasks in Jobs as hooks for:
- monitor
- releasing document locks
2023-02-15 15:30:02 +05:30
Rutwik Hiwalkar
e9c57ee76e
revert: subscription management (#19998)
* chore: add namespaced subscription conf to boot info

* revert: https://github.com/frappe/frappe/pull/18263

* clean: remove daily hook for creating manage subscription btn
2023-02-14 12:04:28 +05:30
barredterra
df2b1ff456 Merge remote-tracking branch 'upstream/develop' into fix-note-2 2023-01-17 19:19:12 +01:00
Ankush Menat
3e715985c6
fix: ignore unhandled emails while deleting email account (#19534)
[skip ci]
2023-01-09 16:53:23 +05:30
gavin
c26b401140
chore: Remove duplicated Oauth2 whitelisted APIs (#19465)
Maintain routes via the `override_whitelisted_methods` hook
2023-01-05 11:46:53 +05:30
barredterra
fdafce9b63 fix: only System Manager can work with public Notes 2022-12-20 14:44:05 +01:00
Daizy Modi
d88ef967b9
feat: hook ignore_links_on_delete to skip doctypes on delete (#19347)
* feat: hook `ignore_links_on_delete` to skip doctypes on delete

* fix: helper comment

* fix: helper comment

* test: test case for `ignore_links_on_delete`

* test: fix test case
2022-12-20 11:17:28 +05:30
Ankush Menat
170b7c9b0f chore: correct devel version 2022-12-13 14:20:55 +05:30
Ankush Menat
a90fc27c75
refactor!: Remove activity feed (#19241) 2022-12-12 15:29:32 +05:30