Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multi-site setup; user with access to one of the sites; nav lists and allows to pick only from the primary site #23

Closed
i-just opened this issue Feb 14, 2019 · 10 comments
Assignees
Labels
bug 🕷 Something isn't working permissions 🔐 sites 🌎 Multisite related issues

Comments

@i-just
Copy link

i-just commented Feb 14, 2019

I have a Craft 3 website which has multiple sites. For all the sections "Propagate entries across all enabled sites?" is turned off (meaning each site has independant entries).

  • For admins (so users who have access to everything) all works well.
  • For users who have access to just one site, when editing a navigation, user is presented with the navigation for the primary site and not the site they're allowed to edit. Also, when trying to add new nodes to the nav, they can only choose from the list of primary site entries (despite the site selection dropdown on the entry picker dialog only lists a site they have access to). e.g. primary site is an English one, and there are German and Dutch sites as well; user only has access to the German site; when editing the navigation they see the nav for English site and when trying to add an entry to that nav they can only choose from a list of English entries;
  • For users who have access to multiple sites, but not all sites (e.g. 2 out of 3), when editing a nav the site selection menu at the top of the page lists all the sites and not just the ones user has access to. When trying to add new nodes to the nav, they can correctly only choose from the site for which they are editing the navigation. e.g. primary site is an English one, and there are German and Dutch sites as well; user has access to English and German sites; when editing the navigation for the German site the site menu lists English, German and Dutch sites (incorrect). If they switch to edit the German site, correct nav shows and they can correctly only add German entries to it.

Please let me know if any of the above is not clear or if you'd like any more info on this one.

Using:

  • Craft CMS 3.1.10
  • Navigate 2.0.1
@janhenckens
Copy link
Member

Hey! Thanks for taking the time to report this and for the full write-up!
I'll try to get through this over the weekend.

@janhenckens janhenckens self-assigned this Feb 14, 2019
@janhenckens janhenckens added bug 🕷 Something isn't working sites 🌎 Multisite related issues labels Feb 14, 2019
@janhenckens
Copy link
Member

@i-just Could the explain this a bit further:

User has access to English and German sites; when editing the navigation for the German site the site menu lists English, German and Dutch sites (incorrect). If they switch to edit the German site, correct nav shows and they can correctly only add German entries to it.

Would you expect it to only show entries for the site you're editing the navigation for?

@i-just
Copy link
Author

i-just commented Feb 14, 2019

@janhenckens, sure, no problem.

Yes, in a nutshell, I'd ecpect it to only show entries for the site user is editing the navigation for. (The DE navigation shouldn't link to EN or NL entries.)

Longer description:
The website has 3 sites: EN, DE and NL. User is allowed to access EN and DE sites. User goes to the Navigation section in admin and edits one of the navs. At the top of the nav edit page there's a sites dropdown. Since user only has access to EN and DE sites, this dropdown should only show EN and DE sites and at the moment it shows all 3: EN, DE and NL (to which user hasn't been given access).
If user's chosen to edit the nav for DE site, if they want to add another entry to the nav they are only allowed to view the DE entries which is correct. Although there's still a sites switch dropdown at the top of the entires selection dialog, but it doesn't actually allow the user to switch between EN and DE - it always lists DE entries (which is ok since user is editing the DE nav, though I'd question if the sites selection dropdown should show on the entries selection dialog in this case).

Hope this helps, but please let me know if I can help any further. The biggest issue for me is the second bullet point from my initial report (the one for user who only has access to one site).

@janhenckens
Copy link
Member

Gotcha, removing the sites menu there is probably a good idea.

I fixed the first part of your second point but I can't reproduce the second part of it (after "Also, ..). With access to 1 site in an install with 3+ sites, I'm still seeing entries from the one site I have access too. Can you maybe add some screenshots of what you are seeing and what's wrong about it?

Thanks again!

@i-just
Copy link
Author

i-just commented Feb 19, 2019

Hi Jan, sorry for a late reply. Thank you for looking into it!
Here are some screenshots that will hopefully make it easier to reproduce.

  • User with access to only 1 site (NL), sees the EN navigation when they go to edit (that's the one you mentioned you're able to replicate)

screen shot 2019-02-19 at 08 38 43

  • User with access to only 1 site (NL), when adding new nodes to the nav, sees the EN entries even though the site dropdown at the top of the dialog box says NL

screen shot 2019-02-19 at 08 39 41

And to compare, here's what I see when I go to edit a NL nav as a full admin:

  • editing NL navigation and it in fact shows the NL nodes:

screen shot 2019-02-19 at 08 40 43

  • and the entries I can choose from to add to the nav when switched to the NL site:

screen shot 2019-02-19 at 08 47 03

Please let me know if you'd like any more info on this.

@janhenckens
Copy link
Member

Awesome, thanks for that! Will have a look tonight.

@janhenckens
Copy link
Member

Hey @i-just, still not able to reproduce this. Would you be willing to call/screenshare so I can have a look at the site & section setup on this site directly? Feel free to reach out on the Craft Discord group as well, that's a bit faster for 1-on-1 communication :) Thanks!

@i-just
Copy link
Author

i-just commented Feb 20, 2019

Hi @janhenckens, I've just installed the develop branch of the plugin and I can't replicate the issue there either. I guess your fix for the first part also fixed the second part of the issue. Tested with both: a user who has access to just one site and a user who has access to two. Thanks again for looking into it!

@janhenckens
Copy link
Member

That's good to hear :) I'll try to get a release out by the end of the week!

@janhenckens
Copy link
Member

Just released 2.0.2 with in it. Could you try if it's still ok with that installed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🕷 Something isn't working permissions 🔐 sites 🌎 Multisite related issues
Projects
None yet
Development

No branches or pull requests

2 participants