Drupal is a registered trademark of Dries Buytaert
Menu Per Role 8.x-1.9 Minor update available for module menu_per_role (8.x-1.9). Google API PHP Client 8.x-4.8 Minor update available for module google_api_client (8.x-4.8). GEO Starter JSON-LD 1.1.1 Minor update available for module geo_starter_jsonld (1.1.1). SQLite VDB Provider 1.4.0 Minor update available for module ai_vdb_provider_sqlite (1.4.0). SQLite VDB Provider 1.3.0 Minor update available for module ai_vdb_provider_sqlite (1.3.0). Burndown 1.0.70 Minor update available for module burndown (1.0.70). Webform MailerLite integration 1.0.4 Minor update available for module webform_mailerlite (1.0.4). Select Icons 2.1.0 Minor update available for module select_icons (2.1.0). Menu Per Role 2.0.0 Module menu_per_role updated after 7 months of inactivity (2.0.0). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides a simple way to check if an entity is publicly accessible, going beyond just anonymous user access. It considers factors like whether the entity has a valid, non-administrative path and can optionally check for URL aliases. It also offers an API for other modules to contribute to this accessibility check.

Adds a simple API to determine if an Entity is publicly accessible or not.

/**
 * Determine if an entity is publicly visible.
 *
 * @param string $entity_type
 *   An entity type of $entity.
 * @param object $entity
 *   The entity object.
 * @param array $options
 *   An optional array of options to use when determining publicity.
 * @param array $data
 *   An optional array of additional data to use when determining publicity.
 *
 * @return bool
 *   TRUE if the entity is publicly visible, or FALSE otherwise.
 */
function entity_is_public($entity_type, $entity, array $options = array(), array $data = array())

This goes beyond simply checking entity_access() as an anonymous user, but also checks other conditions like the following:

  • Does the entity actually have a URI? Is the URI the frontpage path or a non-administrative path?
  • An optional check for requiring the entity to have a URL alias.
  • Is the entity going to be processed with the Rabbit hole module?

The module additionally provides an API for other modules to help determine if an entity is publicly accessible or not.

Activity

Total releases
3
First release
Jun 2026
Latest release
1 month ago
Releases (12 mo)
3 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Release date
1.0.0 Stable Jun 5, 2026
1.0.x-dev Dev Jun 5, 2026
1.x-dev Dev Jun 4, 2026