Commit graph

5337 commits

Author SHA1 Message Date
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
Ankush Menat
31bdb209ed chore: add star imports back for backward compat 2023-08-23 17:48:54 +05:30
Shariq Ansari
1434556a64
Merge pull request #22166 from shariquerik/move-connection-to-tab 2023-08-23 16:56:11 +05:30
Gursheen Anand
9630df16a5 test: rows added dict 2023-08-23 15:51:33 +05:30
Ankush Menat
74d87796af
Merge pull request #22141 from ankush/server_script_shared
refactor!: Disable server scripts by default
2023-08-23 15:19:54 +05:30
Shariq Ansari
e0944419ca fix: moved doctypes's conections to separate tab 2023-08-23 15:16:05 +05:30
Ankush Menat
56b409d069
fix: limit job count in RQ failed registry (#22162)
* fix: limit job count in RQ failed registry

* chore: remove unnecessary test

This just checks if func is called with right values, which keep
changing as things evolve.
Everything is individually tested now so need for this test.
2023-08-23 09:21:51 +00:00
Ankush Menat
1390b972a8 fix(DX): let users know that server scripts are disabled 2023-08-23 14:49:05 +05:30
Ankush Menat
6e0b522ae3 refactor!: Disable server scripts by default
- Move the config to bench level and not site level because, server
  script "threat model" requires consent from a bench owner and not
  individual site.
- While this is a breaking change which people may not like, we believe
  it's essential to improve security model of Frappe.
2023-08-23 14:49:05 +05:30
Ankush Menat
11806c37a0 feat: error logs to include trace id 2023-08-23 14:20:24 +05:30