the common google callback can be used to trigger any method in the whole codebase
restrict it by only allowing domain specific callback method and raise
an error if the domain is not found
Prior to this, every user found in LDAP would mean a System User is
created - now pick the type and role you want to give newly created
users. For the given user types, the role may be picked from:
System User | ldap_settings.default_user_role (Fetched from LDAP settings)
Website User | N/A
{{ Custom Type }} | user_type.role (Fetched from User Type record)
### BREAKING CHANGE
#### Datetime, Date and Time fields will always be cast to respective objects in `setattr`, this will ensure uniformity while accessing the values, no more `getdate`, `get_datetime`, `to_timedelta` wrapper.
- While importing data, the framework does check for `set_only_once`.
- In normal case scenarios, this will work flawlessly since most date fields might not be set_only_once.
- But in Subscription, the date field is set to `set_only_once` and in `after_insert`, `document.save` is called, and while doing so, `set_only_once` is checked [here](1944a547f9/frappe/model/document.py (L566)).
-This works fine if the data imported is in the correct format.
- If the date's data is not in the correct format, the framework throws an error.
- for eg `06-02-2022 00:00:00 != 06-02-2022`
- fixes [Issue/#15370](https://github.com/frappe/frappe/issues/15370)
> no-docs
refactor: clean up code to py39+ supported syntax
- f-strings instead of format
- latest typing support instead of pre 3.9 TitleCase
- remove UTF-8 declarations.
- many more changes
Powered by https://github.com/asottile/pyupgrade/ + manual cleanups
Improves performance 3x - from 0.047s to 0.017s
* Use frappe.get_*_settings to query table once
* Use cached LDAP Settings' document via get_ldap_client_settings
* Use single get_all to query all Social Login providers and related
data
* Skip provider if client_secret doesn't exist