fix: remove auto-generation of secret
This commit is contained in:
parent
c234336ddc
commit
ed71b275a2
3 changed files with 2 additions and 16 deletions
|
|
@ -70,11 +70,7 @@ frappe.ui.form.on('Webhook', {
|
|||
|
||||
enable_security: (frm) => {
|
||||
frm.toggle_reqd('webhook_secret', frm.doc.enable_security);
|
||||
},
|
||||
|
||||
generate_secret: (frm) => {
|
||||
frm.call("generate_secret");
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
frappe.ui.form.on("Webhook Data", {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@
|
|||
"sb_security",
|
||||
"enable_security",
|
||||
"webhook_secret",
|
||||
"generate_secret",
|
||||
"sb_webhook_headers",
|
||||
"webhook_headers",
|
||||
"sb_webhook_data",
|
||||
|
|
@ -148,16 +147,10 @@
|
|||
"fieldname": "webhook_secret",
|
||||
"fieldtype": "Password",
|
||||
"label": "Webhook Secret"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.enable_security == 1",
|
||||
"fieldname": "generate_secret",
|
||||
"fieldtype": "Button",
|
||||
"label": "Generate Secret"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-01-13 01:11:29.392078",
|
||||
"modified": "2020-01-13 01:53:04.459968",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Integrations",
|
||||
"name": "Webhook",
|
||||
|
|
|
|||
|
|
@ -69,9 +69,6 @@ class Webhook(Document):
|
|||
if len(webhook_data) != len(set(webhook_data)):
|
||||
frappe.throw(_("Same Field is entered more than once"))
|
||||
|
||||
def generate_secret(self):
|
||||
self.webhook_secret = frappe.generate_hash(length=32)
|
||||
|
||||
|
||||
def get_context(doc):
|
||||
return {"doc": doc, "utils": frappe.utils}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue