- realtime communication uses pub-sub and no storage. So using same
redis server for both should be just fine.
- This is how FC works since quite a lot of time. We haven't seen any
problem so far.
* Refactor type checks defined in APIs
* Remove dead/deprecated kwargs usages
* Added appropriate hints to APIs and consecutive utils defined in the following modules:
- frappe.realtime
- frappe.translate
- frappe.utils.global_search
- frappe.www.third_party_apps
- frappe.www.search
- frappe.www.printview
other changes
- Name list room as doctype room for more generic use
- avoid re-setting up listeners for generic events
- discard docinfo_subscribe event
- 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
- 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
# Changes
- Introduces `subqry` class to use in where clause when there is a non-column condition. eg.
> .where(subqry(no_of_roles) == 0)
- Convert SQL queries to frappe.qb
# Testing
Functions with query refactors
- frappe.boot.get_user_pages_or_reports() -> Same output of `get_bootinfo()` as develop
- frappe.boot.get_unseen_notes() -> Forms the same query as develop
```sql
SELECT `name`,`title`,`content`,`notify_on_every_login`
FROM `tabNote` WHERE `notify_on_every_login`=1
AND `expire_notification_on`>'2022-03-30 01:10:53.393874'
AND (SELECT `nsb`.`user` FROM `tabNote Seen By` `nsb` WHERE `nsb`.`parent`=`tabNote`.`name`) NOT IN ('Administrator')
```
- frappe.installer._delete_doctypes() -> installed and uninsalled a dummy app to drop tables
### Not tested
- frappe.make_property_setter()
- frappe.realtime.get_pending_tasks_for_doc() [whitelist method]
- frappe.sessions.Session.start()
- frappe.twofactor.cache_2fa_data()
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.