fix: give admin permission to add a delete request
This commit is contained in:
parent
89a27d2770
commit
48c3d618de
3 changed files with 8 additions and 8 deletions
|
|
@ -228,10 +228,10 @@ before_migrate = ['frappe.patches.v11_0.sync_user_permission_doctype_before_migr
|
|||
|
||||
otp_methods = ['OTP App','Email','SMS']
|
||||
user_privacy_documents = [
|
||||
{
|
||||
'doctype': 'Contact',
|
||||
'email_fields': ['email_id'],
|
||||
'personal_fields': ['first_name', 'last_name', 'phone', 'mobile_no'],
|
||||
{
|
||||
'doctype': 'Contact',
|
||||
'email_fields': ['email_id'],
|
||||
'personal_fields': ['first_name', 'last_name', 'phone', 'mobile_no'],
|
||||
'action': 'delete'
|
||||
},
|
||||
]
|
||||
|
|
@ -92,8 +92,8 @@
|
|||
"issingle": 0,
|
||||
"istable": 0,
|
||||
"max_attachments": 0,
|
||||
"modified": "2019-02-01 13:22:04.272688",
|
||||
"modified_by": "mangesh@iwebnotes.com",
|
||||
"modified": "2019-02-07 15:37:42.103778",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Website",
|
||||
"name": "Personal Data Delete Request",
|
||||
"name_case": "",
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
"write": 1
|
||||
}
|
||||
],
|
||||
"quick_entry": 1,
|
||||
"quick_entry": 0,
|
||||
"read_only": 0,
|
||||
"read_only_onload": 0,
|
||||
"show_name_in_global_search": 0,
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ from frappe.utils.verified_command import get_signed_params, verify_request
|
|||
class PersonalDataDeleteRequest(Document):
|
||||
|
||||
def after_insert(self):
|
||||
if frappe.session.user in ['Administrator', 'Guest']:
|
||||
if self.email in ['Administrator', 'Guest']:
|
||||
frappe.throw(_("This user's data cannot be requested for deletion"))
|
||||
else:
|
||||
self.send_verification_mail()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue