Score:2

Page with multiple displays on the same path does not respect the different access rights

hm flag

With Drupal 7, it was possible to define in Views a page with several displays, having all the same URL. By ordering the displays in descending order of access level (Administrator first, Anonymous last), it is possible to have different renderings depending on the role of the logged in user. This allowed for a single menu entry that displayed only the data to which the user is entitled. This doesn't seem to work anymore in Drupal 8 and 9.

Scenario

create 2 users: user1 with the profile Content editor user2 with the authenticated user profile enter image description here

Create a view _test

duplicate the display

rename first display and set role access (for this display only)

enter image description here

rename second display and set role access (for this display only)

enter image description here

Login as user1 and go to /test The view is correctly displayed (title view is Edit as specified in view definition)

enter image description here

Logout and login as user2 and go to /test

enter image description here

Logout, login as admin ans disable display Page user1, save and logout/login as user2 the view is displayed

enter image description here

How is it possible to have the same behavior as in Drupal 7?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.