Commit graph

2041 commits

Author SHA1 Message Date
Ankush Menat
2b95aa66a7
test: increase threshold for perf test (#26316)
We are >2x faster since the time this test was written 😄
2024-05-04 06:34:16 +00:00
Ankush Menat
65b3c42635
fix: only redirect to same domain (#26304)
This limits post login redirects to same domain to avoid social engineering attempts.
2024-05-02 18:02:18 +05:30
Rohan
4bfcccfd11
fix: ignore unittest.mock objects during typing validations (#26301)
* fix: ignore unittest.mock objects during typing validations

* fix: check against base mock class

---------

Co-authored-by: Rohan Bansal <rohan@agritheory.dev>
2024-05-02 11:00:02 +00:00
Ankush Menat
ff31290d33
Merge pull request #25971 from rutwikhdev/discard-transactions
feat: Discard transactions
2024-04-29 16:08:37 +05:30
Ankush Menat
1e4c182b52
fix: retry count per doc instead of global (#26159) 2024-04-25 09:34:52 +00:00
Ankush Menat
3f707f1ae1 test: add test for custom docperm behaviour 2024-04-18 15:44:04 +05:30
Ankush Menat
a1bb734079 fix: filter select perm in get_doctypes_with_read
closes https://github.com/frappe/frappe/issues/26015

Extracted from https://github.com/frappe/frappe/pull/26018
2024-04-18 15:15:47 +05:30
Rutwik Hiwalkar
b1e6f691a7 test: add more tests for discard 2024-04-17 20:54:15 +05:30
Rutwik Hiwalkar
c341360e36 test: add test for discard action 2024-04-16 20:36:04 +05:30
Ankush Menat
15310b14a8
Merge pull request #25918 from ankush/sync_customization
fix!: better "Export customizations"
2024-04-11 19:05:05 +05:30
Ankush Menat
9245062ed9 test: prop setter syncing 2024-04-11 18:14:56 +05:30
Ankush Menat
0fcd0329ef test: remove usage of _testMethodName
Makes things hard to read with code all over the place and tied to test name.
2024-04-11 18:04:33 +05:30
Ankush Menat
b47d9d57fb
fix: handle empty style tag (#25910) 2024-04-11 10:06:36 +00:00
Ankush Menat
caf7aec286
feat(APIv2): Add comment via REST API (#25889)
```
POST /document/Sales Order/S0-123/add_comment
{
    text: "Comment"
}
```
2024-04-10 10:53:22 +00:00
Revant Nandgaonkar
7e16e902d9
feat: allow wildcard for doctype in permission hooks (#25729)
* feat: allow wildcard for doctype in permission hooks

* fix: pass doctype to permission query

* fix: combine methods instead of alternate

* test: wildcard has_permssion hook

* test: wildcard has_permssion make note public

* fix: fetch list of hooks once
2024-04-10 11:44:37 +05:30
Ankush Menat
bef9bdc5ee
fix: log out reliability (#25865)
* fix: Avoid possible cache eviction issue

Clear cache after removing data from DB, so a concurrent request can't put stale data in cache.

* fix: explicitly login as guest after logging out

Avoids problem with some other code potentially re-adding current
session in cache or DB.

* test: avoid hard coded admin pw

* test: reset user after running tests

* fix: only login as guest if in request

Background jobs, some other user disabling someone else etc
2024-04-09 18:56:52 +05:30
Ankush Menat
618c2e60a1 test: fix failing tests 2024-04-08 18:55:05 +05:30
Ankush Menat
eef9c2c8cc refactor!: Better Integer handling
- Remove length: it makes no difference, it's for ZEROFILL only.
- Switch to tinyint for checkboxes in mysql and smallint on postgres.
- Use `int` instead of `bigint` by default.
2024-04-06 11:11:29 +05:30
Ankush Menat
30f00fd5f3 fix: invlaid integer validations for biging
closes https://github.com/frappe/frappe/issues/25566
2024-04-06 11:04:55 +05:30
Ankush Menat
99952880cc fix!: Don't let users with write access to UP bypass UP
IDK why we truly need this, except maybe debugging sometimes. This just
causes confusion and people keep reporting this as security issue.
2024-04-05 18:55:27 +05:30
Ankush Menat
ea5e1b61ad
fix: cint -> avoid precision loss if already integer (#25735) 2024-03-29 22:31:53 +05:30
Ankush Menat
8c6e3a56c6 feat: UUID name implementation for postgres 2024-03-29 21:02:54 +05:30
Ankush Menat
8cc6c31f0e fix: Allow switching between UUID and VARCHAR
- VARCHAR -> UUID = Only allowed when table is empty for now
- UUID -> VARCHAR is not lossy, can be done anytime.
2024-03-29 19:02:28 +05:30
Ankush Menat
1ec4d658fc fix: Allow setting UUID to application code 2024-03-29 19:02:28 +05:30
Akhil Narang
ae34b12ce8
Merge pull request #22548 from blaggacao/feat/uds
feat: support unix domain sockets
2024-03-29 18:11:01 +05:30
Ankush Menat
de48dc2c04
fix: db explain (#25724)
This broke from some recent changes.

It's just a wrapper, so probably no one uses it.
Anyway, fixed and added test to prevent it.
2024-03-29 10:23:12 +00:00
Ankush Menat
87ffe25e71
fix: reserved keywords as col name (#25718) 2024-03-29 15:43:33 +05:30
David
39d4318a27
feat: enable db socket connection 2024-03-29 10:29:50 +01:00
Ankush Menat
23204c0c05
Merge pull request #25256 from ankush/no_commit_doc_events
fix: disable transaction commits during doc events
2024-03-28 12:28:12 +05:30
Ankush Menat
e5a64fd50c test: transaction control 2024-03-28 11:58:38 +05:30
Akhil Narang
722bb3b0fc
Merge pull request #25659 from marination/wkhtml-options
fix: Use CssParser to correctly pass options to wkhtmltopdf
2024-03-27 17:15:36 +05:30
Ankush Menat
b7bc5d3236
fix(round 3): switch to creation sorting (#25669) 2024-03-27 08:59:04 +00:00
Ankush Menat
432c8cf48c
Merge pull request #25624 from ankush/creation
fix!: Switch to `creation` as default sort order
2024-03-27 13:25:53 +05:30
Ankush Menat
c91ea8ccd5 fix: switch default sort for new doctypes 2024-03-27 13:15:46 +05:30
Ankush Menat
672f3b2258 refactor!: sort by creation for clearing old logs 2024-03-27 13:04:01 +05:30
Ankush Menat
ff1f8ddbda
fix: allow any sequence container (#25664) 2024-03-27 06:31:15 +00:00
Ankush Menat
071e269548 fix!: Switch to creation as default sort order 2024-03-27 11:18:28 +05:30
barredterra
09845dac67 test: translate (use only enabled langs) 2024-03-27 00:43:55 +01:00
barredterra
3561f502d1 test: search relevance 2024-03-27 00:40:21 +01:00
marination
8814fe0beb chore: Test valid options extraction 2024-03-26 18:16:53 +01:00
Ankush Menat
f642b1881f fix: invalid select star expansions 2024-03-20 16:31:02 +05:30
Ankush Menat
33547a6354 ci: group output and limit diff
Verbose outut is MASSIVE and unreadable.
2024-03-20 14:23:08 +05:30
Ankush Menat
fbaa2549f2 test: add test for searching with paren 2024-03-20 12:30:11 +05:30
Ankush Menat
3facad0a25 fix: avoid parsing reserved keywords and simple strings 2024-03-20 12:29:58 +05:30
Ankush Menat
ea193ecd48 Revert "Revert "fix: search_link fails when txt contains parentheses (#22892)""
This reverts commit c0cf13b8e8.
2024-03-20 12:29:57 +05:30
Ankush Menat
8a7beebf30
fix: handle distinct for fieldname (#25511)
`distinct count(fieldname)` is supported well but `count(distinct fieldname)` fails if fieldname contains full field with table name included. This PR just adds basic handling for it.

Needs to be rewritten entirely in QB __some day__.
2024-03-18 13:38:29 +00:00
Ankush Menat
adf24b24d4
perf: use base32 space for random names instead of base16 (#25497) 2024-03-17 20:02:57 +05:30
Ankush Menat
2f87a09ad9
test: fix timeout decorator (#25489) 2024-03-16 15:59:04 +05:30
Ankush Menat
05f23dc4a9
test: return string (#25466)
Looks like formatted by mistake :dead:
2024-03-15 16:16:34 +05:30
Ankush Menat
df2b9c0983
fix(recorder): handle frappe.db.sql(run=0) (#25450) 2024-03-14 17:47:37 +00:00