I think it can be done for the Project level. It would be looking for an Allow on the View permission for the specified Project. Maybe Publish as well (depends on your definition of "access").
Please look at this: Getting permission settings from the Tableau Server
A few years back the ever-brilliant Ben Sullins (ben.sullins.1, Ben Sullins, Ben Sullins, Ben Sullins, or Ben Sullins * ) provided this but I don't know if it's relevant any more due to table changes within the Tableau Server db (you would need to do some checking/testing): https://bensullins.com/finding-tableau-server-user-permissions/
* Ben, buddy, you really need to contact the Tableau Community Team and do some kind of clean up all with those aliases!
Remember that even if there's an explicit grant of permissions, you still need to reconcile the Group permissions with Individual permissions, with denials and grants being processed in the right order. I think having denials is fairly rare, as far as real-life situations go, but still worth remembering.