What happened?
Description
Global set shows Multi-Site dropdown with sites that user is not allowed to see.
However when you click on a site that the user is not allowed to see, it won't switch, so it is only the listing of sites.
Steps to reproduce
- Create two sites (
/admin/settings/sites) with both there own base url
- Create a global set, for example 'profile', with a basic text field. Set this basic text field to be translated per site.
- Create a second user who is not admin
- Assign permission to this second user to only edit the first site
- Assign permission to this second user to be able to edit the global set 'profile'.
- Now log in as the user, go to Globals and see the dropdown at the top with multiple site.
Expected behavior
See only the sites that the user is allowed to edit in the dropdown, or not show the dropdown at all when there is only one site they can edit.
It does work when you for example look at the entries page. There you have the same dropdown but only the sites that you are allowed to edit are listed
Actual behavior
The dropdown shows all sites, even sites that the user is not allowed to edit.
Screenshots


Craft CMS version
Craft Pro 5.3.1
PHP version
8.3.9
Operating system and version
MacOS Sonoma 14.3, Darwin 23.3.0
Database type and version
MySQL 8.0.35
Image driver and version
GD 8.3.9
Installed plugins and versions
None
What happened?
Description
Global set shows Multi-Site dropdown with sites that user is not allowed to see.
However when you click on a site that the user is not allowed to see, it won't switch, so it is only the listing of sites.
Steps to reproduce
/admin/settings/sites) with both there own base urlExpected behavior
See only the sites that the user is allowed to edit in the dropdown, or not show the dropdown at all when there is only one site they can edit.
It does work when you for example look at the entries page. There you have the same dropdown but only the sites that you are allowed to edit are listed
Actual behavior
The dropdown shows all sites, even sites that the user is not allowed to edit.
Screenshots
Craft CMS version
Craft Pro 5.3.1
PHP version
8.3.9
Operating system and version
MacOS Sonoma 14.3, Darwin 23.3.0
Database type and version
MySQL 8.0.35
Image driver and version
GD 8.3.9
Installed plugins and versions
None