* 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.
* Added checkbox to disable pass login in settings
* Added user_pass disable option in Login page context
* Hide user-pass fields when option disabled
* Added check for social login key and LDAP
* feat: Disable API based usr-pwd login
* style: format with black
* refactor: simpify auth validation
No need for else clause
* refactor: fixup sys setting json and move field
* refactor: sys settings validation
* refactor: simpler imports
* chore: undo unintional changes
* test: add test for disabled user pass
Co-authored-by: Ankush Menat <ankush@frappe.io>
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.
* Remove six for PY2 compatability since our dependencies are not, PY2
is legacy.
* Removed usages of utils from future/past libraries since they are
deprecated. This includes 'from __future__ ...' and 'from past...'
statements.
* Removed compatibility imports for PY2, switched from six imports to
standard library imports.
* Removed utils code blocks that handle operations depending on PY2/3
versions.
* Removed 'from __future__ ...' lines from templates/code generators
* Used PY3 syntaxes in place of PY2 compatible blocks. eg: metaclass
Existing login attempt tracker is a set of funcions those are not easy
to understand. Created a tracker class that handles all tracker logic and provides
useful methods to access.
Testcases added for the same.