Problem/Motivation

In node_view_permissions_node_grants(), the same grant is given for every langcode in all cases. Either a user gets the grants for all langcodes or for none.

Proposed resolution

So I'm wondering, why not instead just always use the base grant, without any langcode??? We can restructure node_view_permissions_node_access_records() so it gives just 2 grants, rather than 2 per language. This would reduce the number of grants in the database considerably if there are many languages.

AFAICS it would lead to identical behaviour as before in all cases. Or am I missing something??

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3571280.patch3.71 KBadamps

Comments

adamps created an issue. See original summary.

adamps’s picture

StatusFileSize
new3.71 KB

Update: it seems to work, it does simplify the code (see patch), but it doesn't lead to fewer grants. It would force a full rebuild of permissions. So less attractive.