<D extends Definition> String hasAccess(DefDescriptor<?> referencingDescriptor, D def,
Cache<String, String> accessCheckCache) {
// If the def is access="global" or does not require authentication then anyone can see it
DefinitionAccess access = def.getAccess();
if (access.isGlobal() || !access.requiresAuthentication()) {
return null;
}
ConfigAdapter configAdapter = Aura.getConfigAdapter();
String referencingNamespace = null;