<commit_before>// Copyright (c) 2017, Frappe Technologies and contributors
// For license information, please see license.txt

frappe.ui.form.on('User Permission', {
	refresh: function(frm) {
		frm.add_custom_button(__('View Permitted Documents'),
			() => frappe.set_route('query-report', 'Permitted Documents For User',
				{user: frm.doc.user}));
	}
});<commit_msg>Don't show single and child table doctype in User Permission's allowed doctypes (#3973)<commit_after>// Copyright (c) 2017, <NAME> and contributors
// For license information, please see license.txt

frappe.ui.form.on('User Permission', {
	setup: function(frm) {
		frm.set_query("allow", function() {
			return {
				"filters": {
					issingle: 0,
					istable: 0
				}
			};
		});
	},

	refresh: function(frm) {
		frm.add_custom_button(__('View Permitted Documents'),
			() => frappe.set_route('query-report', 'Permitted Documents For User',
				{user: frm.doc.user}));
	}
});
{'fraction_non_alphanumeric': 0.15555555555555556, 'fraction_numerical': 0.014814814814814815, 'mean_word_length': 4.2555555555555555, 'pattern_counts': {'":': 1, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '368764', 'n_tokens_mistral': 364, 'n_tokens_neox': 309, 'n_words': 77}