Problem/Motivation
I had a look at Rabbit Hole and Private Content, and they seem to offer the same features, like hide a content type or a node ...
Steps to reproduce
Look at Private content and Rabbit Hole, and not being able to tell which one to use ...
Proposed resolution
Perhaps add a simple table on the Private content project page, listing the differences between Rabbit Hole and Private content?
Note: This just an afterthought, request for listing the differences is the main purpose.
If they are virtually identical, merging the two projects could be considered?
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
jrochate commentedI'm afraid you have misunderstood one or both modules:
Rabbit Hole is not an access module as Private Content.
For that reason they could never be similar or even merged.
Comment #3
ressaSorry, but you're wrong. Rabbit hole is very much an access module.
Either way, the differences between the two modules could be listed, as I suggested, so that's still active.
Comment #4
jrochate commentedWell, I do not intent to keep discussing this, because I can see you are a long term Drupal developer (much more than I), so I will just detail a little more my first reply, and I hope I can contribute to anything. If not, we're ok anyway :)
Rabbit Hole is primarily about controlling what happens if a user visits the canonical entity route. It is not true access control: entities remain accessible to code and APIs unless you add custom restrictions.
- Typical technical use: Override EntityViewController, subscribe to route events.
Private Content modifies the Drupal access system at the entity level, including Views, APIs, and entity queries.
- Typical technical use: Implements hook_node_access() or custom AccessCheck classes for robust access control.
That's what I referred to when I said about "an access module".
Rabbit Hole Primary API Usage
- Entity API, Route Subscriber, Entity View Controller, Event Subscribers
Private Content Primary API Usage
- Entity Access API, Permissions API, Node Grants API, Route Access Subscribers
On my point of view, Rabbit Hole:
- Purpose: Controls what happens when someone tries to access an entity (like a node, user, or taxonomy term) directly by URL.
- Common Uses: Prevents direct viewing, redirects users, or returns 404/403 responses for certain content types or entities. It’s often used for content that’s not meant to be viewed as a standalone page (e.g., referenced content, system content).
- Visibility Control: Indirect. It doesn’t manage content privacy but rather controls how entities are displayed (or not displayed) at their URLs.
And Private Content
- Purpose: Restricts access to specific content for certain users or roles.
- Common Uses: Hides content from anonymous or unauthorized users, allowing only specified users/roles to view it. Useful for members-only content, confidential documents, etc.
- Visibility Control: Direct. It manages who can or cannot view the content based on permissions.
Cheers.
Comment #5
ressaThanks for laying out the technical differences between the two modules as you see them.
It seems to me, that the dividing point is how we understand the meaning of the word "access", since it can mean different thing to different people ...
My perspective was, that as an end user, after reading the intro text from both modules, it looked like they did more or less the same, or at least with some overlap.
My main goal is to make it easier for users looking for a "hide node(s)" solution, to more easily decide whether to use this or the other project, by adding a sentence or two, or a table on the project page, outlining the difference between the two projects. The merging comment was more like a afterthought ...
I'll update the Issue Summary to emphasize my intention with the issue: To clarify the differences between the two modules, maybe describing scenarios where to use one, or the other.
PS: Even if my account were created yesterday, I think we should try to keep a welcoming and positive tone towards everyone, and avoid sentences like "you have misunderstood" -- I think it's more constructive, and promotes and all round more friendly environment here on drupal.org :)
Comment #6
batigolixI will update the project page with a comparison between private content and rabbit hole
Comment #7
batigolixI edit a comparison table to the project page https://www.drupal.org/project/private_content
With this in place, I think we can close this issue now. Feel free to reopen if you have any questions.
Comment #9
ressaThanks @batigolix, perhaps a global "Comparison of content access modules" documentation page could be considered, which all the access modules could link to?
Here are a few pages for inspiration: