fix: check if user is diabled during api authentication
This commit is contained in:
parent
ba9bc4fb82
commit
10873ad49f
1 changed files with 1 additions and 1 deletions
|
|
@ -702,7 +702,7 @@ def validate_auth_via_api_keys(authorization_header):
|
|||
def validate_api_key_secret(api_key, api_secret, frappe_authorization_source=None):
|
||||
"""frappe_authorization_source to provide api key and secret for a doctype apart from User"""
|
||||
doctype = frappe_authorization_source or "User"
|
||||
doc = frappe.db.get_value(doctype=doctype, filters={"api_key": api_key}, fieldname=["name"])
|
||||
doc = frappe.db.get_value(doctype=doctype, filters={"api_key": api_key, "enabled": True}, fieldname=["name"])
|
||||
if not doc:
|
||||
raise frappe.AuthenticationError
|
||||
form_dict = frappe.local.form_dict
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue