|
|
@ -346,8 +346,8 @@ def grant_user_access(userdata=None, iid=None): |
|
|
|
user_details['Installation ID'] = lst[0][0] |
|
|
|
user_details['User ID'] = lst1[0][0] |
|
|
|
return user_details |
|
|
|
except: |
|
|
|
return {'status': 0, 'error': 'Login Failure'} |
|
|
|
except Exception as role_error: |
|
|
|
return {'status': 0, 'error': role_error} |
|
|
|
|
|
|
|
else: |
|
|
|
# user = frappe.new_doc('User') |
|
|
@ -370,10 +370,10 @@ def grant_user_access(userdata=None, iid=None): |
|
|
|
user_details['Installation ID'] = lst[-1][0] |
|
|
|
user_details['User ID'] = lst1[-1][0] |
|
|
|
return user_details |
|
|
|
except: |
|
|
|
return {'status': 0, 'error': 'Login Failure'} |
|
|
|
except: |
|
|
|
return {'status': 0, 'error': 'Input data error'} |
|
|
|
except Exception as e: |
|
|
|
return {'status': 0, 'error': e} |
|
|
|
except Exception as e1: |
|
|
|
return {'status': 0, 'error': e1 } |
|
|
|
|
|
|
|
|
|
|
|
def generate_keys(user): |
|
|
@ -395,15 +395,3 @@ def login_generate_token(doc=None, method=None): |
|
|
|
water.apple = new_tok |
|
|
|
water.save() |
|
|
|
return water.apple |
|
|
|
|
|
|
|
|
|
|
|
def app_user_validation1(allow_guest=True): |
|
|
|
dicData = {} |
|
|
|
try: |
|
|
|
# doc = frappe.get_doc("Fish", None) |
|
|
|
# dicData['token'] = doc.apple |
|
|
|
dicData['status'] = 1 |
|
|
|
|
|
|
|
except: |
|
|
|
dicData['error'] = 'Failed to get Token' |
|
|
|
return dicData |