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

[KunstmaanAdminBundle]: access level for google should add groups #1868

Merged
merged 1 commit into from Apr 13, 2018

Conversation

sandergo90
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets

When logging in with Google, the user will receive the ROLES given in access_roles in your configuration. This should not add roles, but should add the kuma groups instead.

$user->addRole($accessLevel);
/** @var GroupInterface $group */
$group = $this->em->getRepository('KunstmaanAdminBundle:Group')->findOneBy(['name' => $accessLevel]);
if (null !== $group) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we need some fallback so the process doesn't create a user without a role or group and effectively makes the username unusable. Some projects might have custom groups, whereas you can always be sure the roles will be the same.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, you configure the groups you want to add in the config.yml so it's your own responsibility to check if the group has roles in it IMHO.

@Devolicious Devolicious merged commit 41d9b7c into Kunstmaan:5.0 Apr 13, 2018
Devolicious added a commit that referenced this pull request Apr 27, 2018
* 5.0: (29 commits)
  [MediaBundle] Create runtime config hash using the original image path (#1500)
  [FormBundle] Update regex translation (#1933)
  Change label required for choice pagepart (#1934)
  Change required value for new window menu item (#1932)
  [Documentation] remove addition to upgrade guide that was merged in incorrectly (#1911)
  Update add new translation (#1914)
  [Composer][GeneratorBundle] fix testing + limit fos user to 2.0.* (#1922)
  update changelog
  added option to fix the automated tests on the standard edition (#1912)
  recompile assets
  update changelog
  [MultiDomainBundle]: host override should be set before getting default locale (#1889)
  [KunstmaanAdminBundle]: access level for google should add groups (#1868)
  [AdminListBundle] Start and end form using tab pane, if it exists (#1890)
  [NodeBundle]: node data collector should go to node id (#1891)
  [FormBundle]: add batchsize to export list (#1887)
  [AdminBundle] use bootstrap's default z-index values & remove unnecessary transition and transform props on app__content (#1885)
  [Docs]: move to readthedocs documentation (#1880)
  [GeneratorBundle] Change logic of page title (#1874)
  [LeadGenerationBundle]: times should not be blank (#1865)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants