@frappe.whitelist()
def get_password(doctype, name, fieldname):
 frappe.only_for(u'System Manager')
 return frappe.get_doc(doctype, name).get_password(fieldname)

@ frappe . whitelist ( ) def get_password ( doctype , name , fieldname ) : frappe . only_for ( u'System Manager' ) return frappe . get_doc ( doctype , name ) . get_password ( fieldname )
return the password to use .