Integration Help: Custom Email Check for Private Wiki Page Access

I’m using Frappe Wiki for documentation, and I have two private wiki pages that are only accessible to logged-in users. However, for one of these pages, I need to add an additional layer of access control. Specifically, I want to check if the logged-in user’s email exists in a custom list of emails (not just the standard Frappe user list). I would like to check this against a custom doctype that contains the list of users and their emails. If the user’s email is found in that custom list, they should be allowed to access the page; otherwise, access should be restricted.

Could someone guide me on how to integrate this functionality? I would appreciate an example or steps on how to implement this check within Frappe Wiki.