enkelmedia / TheDashboard

Magic dashboard for Umbraco
MIT License
41 stars 42 forks source link

Users with multiple groups don't see anything #63

Closed colin-tactuum closed 1 year ago

colin-tactuum commented 3 years ago

In Umbraco 8, I have users with multiple groups. The first group has a start node of 'Content root' (-1) and the subsequent group start nodes are children of 'Content root'. In my case 1070. The line of code that sets _userStartNodes in UserToNodeAccessService.cs returns 2 nodes, but both are -1. This results in the HasAccessTo method always returning false and the user never seeing any activity on the dashboard.

enkelmedia commented 3 years ago

Hi!

I can confirm that having "Content Root" and another node as "Content start nodes" for a User results in no content in the dashboard.

Can I ask why you would want to combine "Content Root" and a specific node? In the scenario "Content Root" would basically do nothing as far as I can see (tested on Umbraco 8.0.0 so might have changed).

Sorry: I misunderstood your issue, I thought it was start nodes for a given User, but this is on the "User Group"-level.

Anyway it seems that if a given node is not visible in the tree the User will not have access to it. I'll try to see if i can fix this.

enkelmedia commented 3 years ago

Solved in V8-branch, need to check V9 as well so I'll keep the issue open.

enkelmedia commented 3 years ago

Not sure that this really fixes the issue.

I did get the same issue when I first tried but now after trying to replicate it again I could not do it. I'm really not sure what/if I changed something.

This is what I tried on v8.0.5 of the package:

Create "User Group 1" = Start node: Content Root Create "User Group 2" = Start node: First Content Root Child. (there are more child nodes to Content Root).

Assign these groups to TestUser and reload the dashboard. I would see all content both in the tree and the dashboard (since Group 1 give me access to all content). But are you saying that this does not work for you?

Can you describe exactly how your setup looks? And what version of Umbraco 8? Are you also using "Permission"-settings to hide stuff? Might be that these are colliding in some way.

colin-tactuum commented 3 years ago

I will have time later today or tomorrow to look at this and I will get back to you.

My setup does only have one language.