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

fix(user): default entity value = Full structure #18132

Open
wants to merge 7 commits into
base: 10.0/bugfixes
Choose a base branch
from

Conversation

Rom1-B
Copy link
Contributor

@Rom1-B Rom1-B commented Oct 23, 2024

Checklist before requesting a review

Please delete options that are not relevant.

  • I have read the CONTRIBUTING document.
  • I have performed a self-review of my code.
  • I have added tests that prove my fix is effective or that my feature works.
  • This change requires a documentation update.

Description

  • It fixes !33072
  • Here is a brief description of what this PR does

Completely replace the 'root entity' with 'Full structure' for the user's default entity selection (feature: #17923). This is to handle the case where a user has multiple permissions for the same profile, including one for the root entity that is non-recursive.

image

Copy link
Member

@cedric-anne cedric-anne left a comment

Choose a reason for hiding this comment

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

Honestly, I am not sure to know how it is supposed to work, but I think that selecting Full structure as default entity is finally not always similar to selecting Root entity. Indeed, one may want to have only the Root entity selected by default without any recursivity.
With you proposal, the is_recursive flag defined in the glpi_profiles_users will be ignored. Maybe the solution is to make this field nullable and use the NULL value for the Full structure.

install/mysql/glpi-empty.sql Show resolved Hide resolved
src/User.php Show resolved Hide resolved
@cedric-anne cedric-anne added this to the 10.0.17 milestone Oct 24, 2024
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

Successfully merging this pull request may close these issues.

2 participants