Description of the need
In Drupal 7 / Panels you could choose to show or hide a content pane based on whether a User context
was equal to the logged in User context
. This panels access plugin allowed you to create a 'my own dashboard' separately from the global dashboard
, or to show people their own
blocks, without showing that block to anybody else.
Now that we have a dashboard in core, I suspect more and more people are going to notie that this feature is missing from Backdrop.
Proposed solution We should copy the User: compare visibility rule and turn it into a Visibility condition for the Backdrop block/layout system.
Steps To Test
To reproduce the behavior:
1. Apply the patch from https://github.com/backdrop/backdrop-issues/issues/4029 (or test in the sandbox)
2. Create a layout at the path user/%
-- confirm User
context is automatically added.
3. Scenario 1: Place a block I can only see on my own page
a) Place a custom block (text: my own page
)
b) Add a visibility condition User: Compare
c) Select First User Logged in user account
d) Select Second user User account from path (position 2)
e) Select Grant access if the two are The same user account
f) Save
4. Scenario 2: Place a block I can only see on someone else's page
a) Place a custom block (text: someone else's page
)
b) Add a visibility condition User: Compare
c) Select First User Logged in user account
d) Select Second user User account from path (position 2)
e) Select Grant access if the two are Different user accounts
f) Save
5. Save the layout.
6. Visit your own user profile -- see your own block
7. Visit someone else's user profile -- see the other block
Please do not merge this until https://github.com/backdrop/backdrop-issues/issues/4594 has been merged
PR by @jenlampton: https://github.com/backdrop/backdrop/pull/2869
Recent comments
It could be that you need the Javascript that is included within Seven. If your theme is a subtheme of seven it would be included but if custom, it maybe that you need to copy that and include in...
Nesting problem with field_group 1.x-1.1.1
I was working with a custom admin theme, so there would be nothing you'd need to fix. I just need to look deeper into the css, probably.
Nesting problem with field_group 1.x-1.1.1
Please could you confirm which admin theme it was? Sounds like we might need to get this fixed or removed.
Nesting problem with field_group 1.x-1.1.1