Commit graph

5346 commits

Author SHA1 Message Date
Ankush Menat
0a244b10fc test: basic tests v2 API 2023-10-16 18:12:53 +05:30
Ankush Menat
0c61e61743 fix: delete oauth stuff when deleting users 2023-10-16 18:12:53 +05:30
Corentin Flr
89aab5d748
fix(query_doctypes): Allow search in translated name (#22590)
* fix(query_doctypes): Allow search in translated name

* test: Add test for DocType search in foreign language
2023-10-16 15:13:57 +05:30
Maharshi Patel
bbf91b8afc
fix: sync doctype layout on update standard field (#22699)
* fix: sync doctype layout on update standard field

When standard field is deleted & it is not updated in the doctype layout,
Error occurs as it will try to render fields that doesn't exist
and layout won't render.

to fix this, sync doctype layout on update standard field

* refactor: use savepoint decorator

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-10-16 12:19:17 +05:30
Ankush Menat
e20d79bc28
Merge pull request #22730 from nabinhait/server-script-fix
fix: Delete from cache after deleting a server script
2023-10-16 10:22:20 +05:30
Nabin Hait
04c2944886 fix: Delete from cache after deleting a server script 2023-10-15 19:16:13 +05:30
Ankush Menat
65455ffa89 fix(DX): Add simple cron explanation next to cron fields
closes https://github.com/frappe/frappe/issues/21166
2023-10-14 11:27:18 +05:30
Shariq Ansari
0c4021a1a5
Merge pull request #22701 from shariquerik/permission-table-getting-empty 2023-10-11 15:33:12 +05:30
Shariq Ansari
f8c090ffa8 fix: load doctype model instead of using frappe.model.with_doctype 2023-10-11 15:01:26 +05:30
Gursheen Anand
c5321f12f2 fix: allow write perm by default 2023-10-04 12:51:41 +05:30
Ankush Menat
8242d75bc6 fix: no perm if doc doesn't exist
Right now "doc doesn't exist is thrown, instead we can assume that user
doesn't have permission to this file. User might have access to other
file still.
2023-09-29 13:11:02 +05:30
Ankush Menat
235ae23c3a refactor: Use newline as separator instead of comma 2023-09-25 16:49:26 +05:30
Ankush Menat
68bf9f50c4 fix: Global allowlist for file extensions
This is dumb validation to have and it barely improves security, but
eNterPriSe users keep demanding this nonsense hence we are forced to add
this.

Alternate to https://github.com/frappe/frappe/pull/22528
2023-09-25 16:45:58 +05:30
Ankush Menat
59d1eefa61 refactor: move unhandled email to log settings 2023-09-23 11:23:53 +05:30
Corentin Flr
d73a854191
feat(UX): Add autocomplete for User timezone (#22456)
* feat(UX): Add autocomplete for User timezone

* Revert "feat(UX): Add autocomplete for User timezone"

This reverts commit a721b4a1ef8e0e6b656b6795b832324a955b2f7a.

* fix: convert tz to autocomplete

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-18 22:37:32 +05:30
Ankush Menat
0381f836d6 fix: update correct role permission rule
Right now if you have if-owner rule on doctype then whatever you change
will only apply to last inserted rule because we don't check if-owner
value

Long term better fix: Identify with perm rule name instead of arbitrary
"primary keys" defined in code.
2023-09-18 13:45:20 +05:30
Ankush Menat
b484c65283 fix: check if owner while deleting permission
If doctype has 2 rules: 1 with if-owner and one without then deleting one deletes both.
2023-09-18 12:33:26 +05:30
Ankush Menat
662b07170c test: orpahned doctype check after patch test 2023-09-15 16:18:25 +05:30
Ankush Menat
b9ee6827b4 refactor: stale object removal
- Do it after migration, post migration might use some old doctype.
- stale -> orpahn
- dont commit changes individually
- Remove table doctype too
2023-09-15 16:18:25 +05:30
HENRY Florian
cf63690a3c
feat: use Link field for search in Role Permissions Manager (#22232)
Co-authored-by: Raffael Meyer <14891507+barredterra@users.noreply.github.com>
2023-09-15 15:13:02 +05:30
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
google-boy
9d8c6012a2
fix: Check if user has no associated email accounts. (#22355)
check that the return array does not exist, is not an array, or is empty 

http://stackoverflow.com/questions/24403732/ddg#24403771
2023-09-13 14:40:29 +05:30
Ankush Menat
970a740164
revert: #22308 (#22389)
* Revert "chore: move function to correct file"

This reverts commit ebfdfa283b.

* Revert "refactor!: merge get_site_url into get_url (#22308)"

This reverts commit 2001bc278f.
2023-09-13 14:34:52 +05:30
Alfredo Altamirano
39c06cffcd
fix: pass console to import file (#22385)
Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-13 14:28:52 +05:30
Deepesh Garg
b3742b45a8
Merge pull request #22104 from GursheenK/doc-comparator
feat: audit trail
2023-09-13 14:04:15 +05:30
Ankush Menat
c55dcc439e
feat: max_file_size configurable from system settings (#22384)
also increase default max_file_size from 10MB to 25MB
2023-09-13 13:33:36 +05:30
Gursheen Anand
aa18c4f751 fix: rename imports 2023-09-12 13:56:23 +05:30
Gursheen Anand
99df38a264 refactor: avoid fetch for amended field again 2023-09-12 12:57:33 +05:30
Gursheen Anand
bda868b0c2 fix: rename doctype 2023-09-12 12:56:48 +05:30
David Arnold
2001bc278f
refactor!: merge get_site_url into get_url (#22308)
* chore: merge get_site_url into get_url

* fix: keep alias with deprecation notice
2023-09-11 15:09:05 +05:30
Gursheen Anand
a7a6f438be fix: use latest doc name for test 2023-09-11 11:49:40 +05:30
Gursheen Anand
4add076285 refactor: use old value instead of fetching parent doc 2023-09-11 11:15:24 +05:30
Gursheen Anand
0b722906db fix: fetch prev docs from last amended doc 2023-09-11 11:10:06 +05:30
Gursheen Anand
177955a12f fix: check label for fields 2023-09-11 11:06:01 +05:30
Bernd Oliver Sünderhauf
2efdead485
fix: Defer module deletion IO post DB commit (#22336)
* fix: Defer module deletion IO post DB commit

Previously, the IO operations for module deletion were executed before the DB commit. If the latter failed, this caused significant inconsistencies. This change ensures that IO operations are deferred until after the DB transaction is successfully committed.

* refactor: module deletion

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-10 13:00:50 +05:30
Ankush Menat
cbc5f0b8db
build(deps): update python dependencies (#22294)
* build!: Remove pycryptodome dependencies

This is added for payments app, shouldn't be added here.

ref: https://github.com/frappe/frappe/pull/9955/

* build(deps): update many python dependencies
2023-09-02 12:10:13 +00:00
Ankush Menat
c22f128475 chore: disable perf tests on postgres 2023-09-02 16:07:08 +05:30
Sabu Siyad
7f88f819ef
feat: communication: override on_update (#22267)
* feat: communication: override `on_update`

If reference doc has a property, `on_communication_update`, execute it.
Otherwise, continue with default/magic actions

* fix: make sure method is callable

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2023-09-02 16:01:38 +05:30
Raffael Meyer
a5c176e5f5
feat: show warning headline in public files (#22242) 2023-09-02 15:53:01 +05:30
Raffael Meyer
744b383e9a
fix: don't attach web view link if disabled (#22276)
* fix: don't attach web view link if disabled

* feat: improve label

old: "Send document Web View link in email"
new: "Include Web View Link in Email"
2023-09-02 11:43:28 +05:30
RitvikSardana
6fc2cc7fa3
fix: when tree doctype is created ignore_user_permissions is set to 1 by default (#22235) 2023-09-01 14:29:50 +05:30
Ankush Menat
9436c14265 chore: treat background submit as beta feature 2023-08-31 11:59:40 +05:30
Ankush Menat
e88cdb6e70
Merge pull request #22224 from ankush/desk_user
feat: `Desk User` role
2023-08-29 20:27:21 +05:30
Ankush Menat
92d11d9f1f fix: revert communication doctype default
This breaks for users who dont have "inbox" which is a lot of users.
2023-08-29 17:21:18 +05:30
Ankush Menat
dc8d7b019a refactor!: Lower roles from All To Desk User 2023-08-29 12:07:57 +05:30
Ankush Menat
1b406edd54 feat: Desk User role 2023-08-28 22:31:23 +05:30
Ankush Menat
05ff5646c5 chore: let people disable/edit scripts even if disabled 2023-08-28 11:48:43 +05:30
Ankush Menat
08efd373ee fix(DX): sort recorder queries 2023-08-26 19:27:55 +05:30
Ankush Menat
730e906dfd
refactor!: remove implicit primary key from logs (#22209) 2023-08-26 16:01:47 +05:30
Ankush Menat
ea1e73568c
fix: clear server script cache on delete (#22207) 2023-08-26 12:44:12 +05:30