frappe / helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software
https://frappe.io/helpdesk
GNU Affero General Public License v3.0
548 stars 234 forks source link

Insufficient Permission for HD Service Level Agreement #2002

Open clayrisser opened 2 days ago

clayrisser commented 2 days ago

Information about bug

I created a form for Guests to create support tickets. I am unable to get it to work.

Below is the code I created for it, but I an error.

        new_ticket = frappe.get_doc({
            "doctype": "HD Ticket",
            "subject": "Website Support Request",
            "description": message,
            "priority": "Urgent",
            "ticket_type": "Question",
            "status": "Open"
        })
        new_ticket.insert(ignore_permissions=True)
        frappe.db.commit()

Version

Frappe Builder: v1.11.5

Education: v15.3.2

ERPNext: v15.34.0

Frappe Framework: v15.8.1

Helpdesk: v0.10.0

Frappe HR: v15.28.0

Payments: v0.0.1

Scrum: v0.0.1

Installation method

Kubernetes

Relevant log output / Stack trace / Full Error Message.

'["Traceback (most recent call last):\\n File \\"apps/frappe/frappe/app.py\\", line 114, in application\\n response = frappe.api.handle(request)\\n ^^^^^^^^^^^^^^^^^^^^^^^^^^\\n File \\"apps/frappe/frappe/api/__init__.py\\", line 49, in handle\\n data = endpoint(**arguments)\\n ^^^^^^^^^^^^^^^^^^^^^\\n File \\"apps/frappe/frappe/api/v1.py\\", line 36, in handle_rpc_call\\n return frappe.handler.handle()\\n ^^^^^^^^^^^^^^^^^^^^^^^\\n File \\"apps/frappe/frappe/h…esk/helpdesk/utils.py\\", line 23, in check_permissions\\n frappe.throw(f\\"Insufficient Permission for {doctype}\\", frappe.PermissionError)\\n File \\"apps/frappe/frappe/__init__.py\\", line 652, in throw\\n msgprint(\\n File \\"apps/frappe/frappe/__init__.py\\", line 617, in msgprint\\n _raise_exception()\\n File \\"apps/frappe/frappe/__init__.py\\", line 568, in _raise_exception\\n raise exc\\nfrappe.exceptions.PermissionError: Insufficient Permission for HD Service Level Agreement\\n"]'
clayrisser commented 2 days ago

I tried creating a web form and I get the same error.

Screenshot 2024-09-26 at 4 37 34 PM
clayrisser commented 2 days ago

I disabled Track SLA from the settings and I still get the error.

Screenshot 2024-09-26 at 4 38 50 PM
clayrisser commented 1 day ago

@RitvikSardana do you know what causes this issue?