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

getEditableSites() is empty when only 1 site is defined #3049

Closed
janhenckens opened this issue Jun 30, 2018 · 0 comments
Closed

getEditableSites() is empty when only 1 site is defined #3049

janhenckens opened this issue Jun 30, 2018 · 0 comments

Comments

@janhenckens
Copy link
Contributor

Description

On a Craft site with only 1 site defined, the Sites section is missing from the user permissions screen, resulting in getEditableSites() returning nothing.

The user clearly has permission to edit the single site since I can give it access to all the sections & content of the site.

I'm using getEditableSites in a new plugin to determine to which site the user should have access, but that doesn't work for a single site install.

Steps to reproduce

  1. Create a clean craft install
  2. Add a new user and don't it an admin user
  3. Check Craft::$app->sites->getEditableSites()

Additional info

  • Craft version: 3.0.13.2
  • PHP version: 7.2.1
  • Database driver & version: MySQL 5.6.38
  • Plugins & versions: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant