import jingrow


def is_public_resource(pagetype: str, docname: str) -> bool:
	def bench(bench: str):
		release_group = jingrow.get_value("Bench", bench, "group")
		return jingrow.get_value("Release Group", release_group, "public")

	if pagetype == "Bench":
		return bench(docname)

	if not jingrow.get_meta(pagetype).has_field("public"):
		return False

	return bool(jingrow.get_value(pagetype, docname, "public"))
