Pls Recommend Journal Entry Restriction

Hello,
I need advise on best way to manage Posting business expenses by non-accounting user.

I am implementing for a multi-location distribution business.
The branch office user is expected to submit their expenditures using JV, (and is given Account-user access)
We are creating a sub accounts (Under Current Asset and Indirect Expense) for these branches in the COA to record transactions specific to their branch.

Please How can we restricts access for branch user only to their specific account. We do not want them to mistakenly select and post to other accounts.

Apart from the above, every process is clear, because user would normally work only with Sales Invoice, Sales order, Delivery Note, Payment Entry Tools, which by design is per-configured for a non-accountants.

Custom Javascript might be the way to do this. Maybe something like,

// additional permission check
frappe.ui.form.on(“Journal Entry”, {
validate: function(frm) {
if(user=="user1@example.com" ) {
// Put your additional custom logic here for validation based on account
msgprint(“Your custom message”);
validated = false;
}
}
});

More help here