Gavin D'souza
c3c1848b2a
fix: Restrict socket data to respective users after commit
...
Fix conditions to bother only those who asked for the data:
- Clear permissions cache only for updated users' data
- Defer appropriate events until commit to avoid ghost events
- Remove event unused by desk (and other apps)
2022-11-16 23:07:07 +05:30
Gavin D'souza
16bd7a2d0b
fix(socketio): Scoping & hoisting bugs
...
Due to the previous logic, cookie data seemed inconsistent causing ghost
sessions.
2022-11-16 23:02:23 +05:30
Gavin D'souza
96fee8c293
feat: {site}:website room open to all users
...
- Subscribe to room and pass messages without auth
- Pass `room='website'` to publish_realtime to use
- Pass discussions' comms through particular site's website room
2022-11-16 21:53:49 +05:30
Gavin D'souza
2b7e4554c4
fix(desk): maintain realtime & cached data consistency
...
- Clear docinfo_update callbacks before setting one; ensure only
one active callback at any given point.
- Remove document from local cache if list_update sent if not edited
2022-11-16 15:19:03 +05:30
Ankush Menat
45b0c3e28d
chore: remove dead code
2022-11-16 14:05:53 +05:30
gavin
24f4b85031
Merge branch 'develop' into socket_io-refactor
2022-11-15 19:19:29 +05:30
Ankush Menat
9fc330ea6c
Revert "fix: remove middleware to clear frappe.local ( #18874 )" ( #18886 )
...
This reverts commit 2971abe517 .
2022-11-15 18:45:51 +05:30
Gavin D'souza
3a8fa6cbd5
refactor(socketio): Use same room for doc & info events
...
other changes
- Name list room as doctype room for more generic use
- avoid re-setting up listeners for generic events
- discard docinfo_subscribe event
2022-11-15 17:55:53 +05:30
Ankush Menat
9b90e620bc
chore: disable flaky test
...
This is
- flaky
- difficult to find source of flake because of crazy tests
- adds little value tbh
[skip ci]
2022-11-15 17:17:10 +05:30
Sagar Vora
425e4bf1b3
fix(File): validate attached_to_* when saving ( #18880 )
2022-11-15 16:19:02 +05:30
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