You do not have enough permissions to access this resource

That commit has been overwritten by the one I linked. The problem is in the check_parent_permission function:

def check_parent_permission(parent):
	if parent:
		if frappe.permissions.has_permission(parent):
			return
	# Either parent not passed or the user doesn't have permission on parent doctype of child table!
	raise frappe.PermissionError

As you can see, the error is raised if you either do not have permission on the parent or there is no parent passed.

See… so this can be done just after_save trigger, that’s not good for my use case…
@rmehta can you help me with that please?

Or you can make a white listed API in the server side in your custom app that accept your filters as parameters and then let it returns your result based on your frappe.get_value(“Child Table”, filters={“fieldname”: para1, “another_fieldname”: para20}, fieldname = [“f1”,“f2”,“f3”]) function and then call it from the client side by the frappe call something like:

frappe.call({
      	method: "yourApp.path.to.your.api",
	args: {
					
		paras:["para1", "para2"],
	},
	callback: function (r) {
		data = r.message;
	}
});

Yeah I did that in the first time, but after I choose change to frappe API…

Need help here, Modelo column has a link with a doctype, when I try interact with Nº Série or Tag is giving me the follow error.
Note: That child table has no custom script.

1 Like

Hi, I just got the same error.

Try removing Auto Name field on child table doctype.

Hello, I tried your suggestion and not worked for me :confused:

EDIT: Problem solved, renaming childtable.
My childtable has a link to another doctype, and that doctype has a link to another doctype that the name was the same of this childtable. I think the naming ambiguity was confusing the system then…

Getting the same error, exact same and i tried renaming the child table but still getting same permission error

What’s your childtable name?

Already solved. Was missing the parameter