Commit graph

893 commits

Author SHA1 Message Date
Faris Ansari
2676c9c2ec
feat: SQLite FTS5 search framework for Frappe apps (#33359)
- Abstract SQLiteSearch base class with full-text search
- Spelling correction, recency boosting, and custom scoring
- Supports search filtering and configurable document indexing
- hooks for auto-indexing
  - build index after migrate
  - build index (if not exists) every 15 mins
  - update doc index on_update
  - remove doc index on_trash
2025-07-29 11:18:56 +05:30
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
Soham Kulkarni
64db88228f
refactor: seperate blogs into a seperate app (#32737)
* fix: remove doctypes,workspace blocks, files

* fix: minor python tests and UI tests

* fix: remove blog post from tests

* fix: remove blogger as role for tests

* fix: add check for if doctype exists

* fix: ui test

* fix: more cleanup

* fix: cleanup comments and fix test_query

* fix: resolve conflicts

* fix: add warning and handle comments
2025-07-28 14:35:02 +05:30
Soham Kulkarni
db5433a98d
Merge pull request #33323 from sokumon/email-queue-sending-issue
fix: dont let email queue stay in Sending status
2025-07-15 19:03:06 +05:30
Ankush Menat
ef30873fe8
chore: update title in hooks.py (#33341) 2025-07-15 18:55:38 +05:30
sokumon
74b4acacd4 fix: better name for the retry job 2025-07-14 18:30:37 +05:30
sokumon
2bbf72061c fix: dont let email queue stay in Sending status 2025-07-14 18:10:43 +05:30
18alantom
db4a7504e5
fix: add hooks to handle cors 2025-07-04 13:18:43 +05:30
18alantom
4cd8115c4c
refactor: unify how .well-known routes are handled 2025-07-02 15:17:42 +05:30
sokumon
39c554d100 fix: more cleanup 2025-06-27 02:34:29 +05:30
sokumon
793bd6387f fix: global search text, remove hooks 2025-06-18 16:23:36 +05:30
sokumon
422995cd45 fix: seperate backup options into app 2025-06-14 23:59:22 +05:30
Akhil Narang
1a3602f715
feat: add in a doctype to optionally track API Requests (#32622) 2025-06-06 13:22:25 +05:30
Ankush Menat
f17658c4c6
fix: Sample link counts and flush frequently (#32713)
We recently applied limit on how many links can be buffered. That
pretty much "samples" only records created at start of the hour.

This change makes it flush 4x frequently and samples 10% of input to
reduce updates. Again, statistically this serves same purpose.
2025-05-29 12:18:28 +05:30
Soham Kulkarni
f4edb51d30
Merge pull request #32228 from sokumon/note-issue
fix(Note): make note show up only on login
2025-05-21 19:52:49 +05:30
Ankush Menat
e26ba5dfdd
perf: split maintenance tasks into separate queue (#32413)
* feat: Maintenance queues for scheduled jobs

* refactor: Move jobs to maintenance queues

* test: update tests
2025-05-06 17:10:49 +00:00
Soham Kulkarni
f841f77534
Merge branch 'develop' into eps-removal 2025-04-23 01:21:07 +05:30
sokumon
67c1d13f91 fix(Note): make note show up only on login 2025-04-21 17:58:18 +05:30
Revant Nandgaonkar
2a5506ebc3 fix: add OAuth Bearer Token to clearing doctype hook 2025-04-17 07:56:10 +00:00
sokumon
196f76028f fix: remove leaderboard and custom timeline handling 2025-04-17 00:26:57 +05:30
sokumon
a1fca6ab63 fix: remove energy points / social module 2025-04-17 00:26:57 +05:30
Ankush Menat
4fac934cec
perf: long-lived posthog threads (#31821)
* build: bump posthog to latest

* perf: Use long living posthog client
2025-03-20 12:36:17 +05:30
Gavin D'souza
424f76c6b1
fix: Move google calendar sync from hourly to all 2025-03-19 15:55:29 +01:00
Ejaaz Khan
8d84176d6f refactor: add validation and refactor code of auto repeat 2025-01-20 16:31:59 +05:30
Shariq Ansari
d6386e6e06
Merge pull request #28767 from frappe/remove-billing-pages 2025-01-15 13:21:32 +05:30
Ankush Menat
77fb1a0e3d fix: prevent rl keys from getting evicted 2025-01-06 11:56:03 +05:30
Ankush Menat
787ae8a438
fix: Skip rate limit counters when cleaning cache (#28932) 2024-12-27 07:48:10 +00:00
Ankush Menat
841c0207e7
perf: lower reminders frequency (#28931)
change from 4 -> 15 minutes

Closes https://github.com/frappe/frappe/issues/28927

I agree with issue, this is too frequent for a feature that isn't used
by that many.
2024-12-27 07:37:25 +00:00
Ankush Menat
8df9d3acdd fix: protect monitor logs from cache eviction 2024-12-18 19:13:02 +05:30
Bread Genie
bf97db2de9 refactor: remove billing pages and navigate user to Frappe Cloud directly 2024-12-13 13:13:12 +05:30
Corentin Forler
e0c08fab4e
fix: Fix typo in build_domain_restriced function names 2024-11-20 13:52:19 +01:00
Shariq Ansari
1001f1fe0e fix: added trial banner in desk 2024-11-15 16:09:17 +05:30
Shariq Ansari
167929ffd7 fix: added manage billing button in navbar settings dropdown 2024-11-15 14:32:05 +05:30
Shariq Ansari
7b7eafc188 fix: implemented Billing, Plans, Invoices in sidebar - body layout 2024-11-13 12:08:30 +05:30
Gavin D'souza
ecb4795ed3
feat: Enable Sentry Sampling
Closes https://github.com/frappe/frappe/issues/28245
2024-10-28 11:27:51 +01:00
Sumit Bhanushali
847dd62ec0 feat: permission log 2024-09-30 14:54:32 +05:30
David
ac379f297c
fix: Add support for minutes-based notifications 2024-09-10 16:45:53 +02:00
Rushabh Mehta
8dbc2832c5 feat: App switcher 2024-09-06 14:11:39 +05:30
Shariq Ansari
67eb28d836 fix: redirect to apps if multiple apps installed or redirect to apps portal 2024-08-08 18:29:16 +05:30
Shariq Ansari
d7b217b384
Merge branch 'develop' into app-switcher 2024-08-08 18:27:19 +05:30
Rushabh Mehta
774d86f642 feat: Workspace Settings - allow enabling and disabling of workspaces during setup 2024-08-04 13:41:08 +05:30
Shariq Ansari
9b3c46e700 fix: include apps link in standard navbat items 2024-08-02 20:12:50 +05:30
David
e2517d11e8
chore: add include_icons jinja global 2024-06-11 20:03:15 +02:00
David
37d8e2bb36
perf: lazy load svg sprictes on websites 2024-06-11 20:01:55 +02:00
Ankush Menat
04642edd63
fix: Move Monitor dump to after_response (#26703)
It needs access to response to capture status code and size etc
2024-06-06 14:38:22 +00:00
Ankush Menat
80a3bf33cf
perf: rearrange some frequent jobs (#26591)
* perf: lower frequency of not so useful jobs

* fix: 4x deferred insert frequency
2024-05-29 17:41:06 +05:30
gavin
a71df1839f
fix: Drop file_manager.download_file (#26575)
Closes https://github.com/frappe/frappe/issues/26424
2024-05-27 19:30:48 +05:30
Ankush Menat
445e1dbd6b
perf: num2words, babel, gettext, sentry imports (#26475)
num2words - 260KB - Used frequently on ERPNext sites.
babel - 1.1MB Gets imported because of dates, localization
sentry - 2.8MB should be loaded only if envvar is set
gettext - required for reading translations
2024-05-18 07:20:41 +00:00
Ankush Menat
16c8a30861 fix: Avoid erasing recorder during clear_cache
This reverts commit eadfe86fd834f43925956fa6d759127aaf363441.
2024-05-13 17:41:34 +05:30
Ankush Menat
8ab308838b feat: Keep certain keys persistent in cache 2024-05-04 15:08:35 +05:30