Commit graph

40136 commits

Author SHA1 Message Date
Gavin D'souza
97d2eab3e2 refactor(socketio): docinfo_update
- Rename event from `update_docinfo_for_{}_{}` to docinfo_update
- Separate rooms for separate documents generated on requirement
- Check if user has access to doc before sharing docinfo
2022-11-15 13:15:34 +05:30
Gavin D'souza
9931c3af04 refactor(socketio)!: list_update
- Subscribe to list_update only for the list/report views that are
  opened
- Check if user has read permission for doctype to subscribe to list
  updates
2022-11-15 13:15:34 +05:30
Gavin D'souza
e97994f211 chore: Drop duplicate event method
This particular definition was chosen since there was no corresponding
subscribe method with the same key generation logic
2022-11-15 13:15:34 +05:30
Gavin D'souza
54bf617d09 perf(socketio): get_site_name
The usages and number of conditions evaluated in the function called for
some sort of a cache. If the site name is evaluated once, store it in
the socket object!
2022-11-15 13:15:34 +05:30
Gavin D'souza
4de9c39bb8 refactor: SocketIO
- Check request data in middleware
- Authenticate each connection before allowing room access
- Allow site room access only to System Users, restrict Website User &
  Guests to their respective user rooms

Note: This doesn't check for roles / permissions
2022-11-15 13:15:30 +05:30
Gavin D'souza
5210ea593f fix(socketio): Re-try thrice before trying to reconnect
Set reconnectionAttempts to 3. If the server doesn't want to connect
with the respective client (invalid origin, no cookie or sid transmitted)
or is gone down, socketio client would retry connections indefinitely.
This change limits retrying connection to just thrice every second.
2022-11-15 13:12:51 +05:30
Gavin D'souza
c86e1de38a fix(recorder): Publish update only to Administrator 2022-11-15 13:12:51 +05:30
Gavin D'souza
01fdb6a241 chore: Remove unused realtime updates
These events were added for supporting listeners in desk. The listeners
have thus been removed and these are now unnecessary messages published
to anyone landing on Frappe pages or on Desk.
2022-11-15 13:12:51 +05:30
Sagar Vora
2971abe517
fix: remove middleware to clear frappe.local (#18874) 2022-11-15 11:07:18 +05:30
gavin
440825a372
refactor: which > find_executable (#18872)
Use shutil from the standard library instead of distutils to find
executables in PATH
2022-11-14 18:15:38 +05:30
Faris Ansari
5695346668
fix: allow mark tag in texteditor (#18871) 2022-11-14 17:33:28 +05:30
Ankush Menat
990a96e48b
feat: show utilization percent on RQ Worker (#18868)
[skip ci]
2022-11-14 15:55:20 +05:30
Ritwik Puri
feb9190cac
fix: check if the doctype exists before adding default logtypes in log settings (#18867) 2022-11-14 15:54:41 +05:30
Ankush Menat
f019b4fab6
build(deps): update caniuse (#18866)
[skip ci]
2022-11-14 15:46:54 +05:30
Ritwik Puri
07f5075784
Merge pull request #18861 from resilient-tech/hardcode-doctype
fix: hardcode doctype in google oauth callback
2022-11-13 00:05:02 +05:30
Sagar Vora
838a52328c fix: hardcode doctype in google oauth callback 2022-11-12 23:51:15 +05:30
Ritwik Puri
0cd3d97132
Merge pull request #18856 from resilient-tech/better-templates
chore: fully commented, consistently formatted JS boilerplates
2022-11-12 20:41:23 +05:30
Ritwik Puri
518b7e1c66
Merge pull request #18251 from Aradhya-Tripathi/bg-submissions
feat: Background submissions for submittable doctypes
2022-11-12 20:06:57 +05:30
Aradhya
3759e5bbcd refactor: lint
fix: removed time.sleep
2022-11-12 20:06:17 +05:30
Aradhya
7c8af96046 refactor: leaving job status as it is on completion 2022-11-12 20:06:17 +05:30
Aradhya
1145bab9d8 refactor: checking docstatus before asserting failure 2022-11-12 20:06:17 +05:30
phot0n
b09eb2f317 fix: use index for ref_docname in submission queue doctype 2022-11-12 20:06:17 +05:30
phot0n
f9a10d32d1 fix: use quoted doctype and docname in alert 2022-11-12 20:06:17 +05:30
phot0n
ad6a11e34c feat: queue submission for bulk submit 2022-11-12 20:06:17 +05:30
phot0n
3dc376cd5c chore: remove reload listener from form 2022-11-12 15:16:05 +05:30
phot0n
b21f9a5b26 fix: submission queue banner
if last_failed_submission and last_submissions are equal, show only last_failed_submission
2022-11-12 15:10:46 +05:30
phot0n
723a27bda7 fix: try except for nosuchjoberror in _unlock_reference_doc
* fix: condition for not unlocking reference doc

* chore: change id param -> job_id for update_job_id
2022-11-12 15:08:29 +05:30
Ankush Menat
6c01d1d417 refactor: hmac generation
Reduce code duplication
2022-11-12 13:05:57 +05:30
Sagar Vora
198bc4275f chore: fully commented, consistently formatted JS boilerplates 2022-11-12 12:48:13 +05:30
Ritwik Puri
ef758130d6
Merge pull request #18852 from resilient-tech/simpler-init
chore(BaseDocument): simplify `_table_fieldnames` property init
2022-11-12 11:09:07 +05:30
Aradhya
36033d4145 feat: Added finished condition while unlocking 2022-11-12 09:32:49 +05:30
Aradhya
e8b3f8f710 refactor: only showing unlock button if job id is defined 2022-11-12 09:26:27 +05:30
Aradhya Tripathi
07bd958dfd
Merge branch 'develop' into bg-submissions 2022-11-12 08:37:55 +05:30
Aradhya
23fe91dede fix: unlock ref doc 2022-11-12 08:26:37 +05:30
Sagar Vora
7f3ea7a520 chore(BaseDocument): simplify _table_fieldnames property init 2022-11-12 00:36:15 +05:30
Ankush Menat
ba27434d81
refactor: Use safer hashing algorithm for verified_command (#18848) 2022-11-11 21:42:51 +05:30
Ankush Menat
0c3615caa7
ci: remove duplicate rule causing backport failure
[skip ci]
2022-11-11 21:41:51 +05:30
Ankush Menat
a7377d23fc
refactor!: Drop deprecated functionality (#18815) 2022-11-11 19:54:36 +05:30
jll-02
bfab719154
fix(security): prevent xss attack in search (#18847) 2022-11-11 18:11:45 +05:30
Ankush Menat
668a730788 fix: avoid patching QB if already patched 2022-11-11 16:38:05 +05:30
mergify[bot]
32e5d94f4a
Fix : mailbox url route with mailbox selector (backport #18807) (#18808)
* fix : correct inbox view route (#18807)

Close #18625 and #14832
More details here : https://discuss.erpnext.com/t/mail-inbox-view-does-not-work-no-mailbox-icon/92143/3?u=jodeq

(cherry picked from commit cd7bafa072ed27d634784c2888d82ada1b5f565e)

# Conflicts:
#	frappe/public/js/frappe/list/list_view_select.js

* chore: fix conflicts

Co-authored-by: JodeQ <jodeq@users.noreply.github.com>
2022-11-10 22:31:20 +05:30
Shariq Ansari
72bdecb65e
Merge pull request #18836 from shariquerik/breadcrumb-fix 2022-11-10 19:51:55 +05:30
Shariq Ansari
cecb89bde3
Merge branch 'develop' into breadcrumb-fix 2022-11-10 19:47:47 +05:30
Shariq Ansari
31415bb72d revert: async await in breadcrumbs.js 2022-11-10 17:32:25 +05:30
gavin
9ad0538521
perf(doc): skip order_by when name is set in load_from_db (#18837)
Setting ORDER BY clause in the SQL nudges MariaDB to not use index
(even) for primary keys.
2022-11-10 16:53:28 +05:30
gavin
a093b7b34c
perf(workflow): get_transitions (#18834)
* Load from db only if doc passed is not of type Document. This was
  added earlier to load in case of dicts. ref: https://github.com/frappe/frappe/pull/11883
* Move blocks to evaluate only if required
* Add typing hints
2022-11-10 16:22:28 +05:30
Anand Baburajan
bc0abd9cfd
feat(util): add is_last_day_of_the_month (#18835)
* feat: add is_last_day_of_the_month
2022-11-10 15:18:49 +05:30
Shariq Ansari
19bb79215f fix: breadcrumbs is broken 2022-11-10 15:18:15 +05:30
Shariq Ansari
a434b5fb0d
Merge pull request #18829 from shariquerik/page-menu-btn-fix 2022-11-10 14:34:45 +05:30
Ankush Menat
52ee21270e refactor: validation of permlevel 2022-11-10 14:15:24 +05:30