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

EZP-28598: Fixes no filtering langauge on create content UI #226

Merged
merged 1 commit into from
Dec 20, 2017

Conversation

webhdx
Copy link
Contributor

@webhdx webhdx commented Dec 19, 2017

Question Answer
Tickets https://jira.ez.no/browse/EZP-28598
Bug fix? yes
New feature? no
BC breaks? no
Tests pass? no
Doc needed? no
License GPL-2.0

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@micszo
Copy link
Member

micszo commented Dec 19, 2017

@webhdx is it intentional that error 500 is thrown when the two languages arrays in ezplatform.yml are not identical?
screen shot 2017-12-19 at 10 35 09
(one is in system: site_group: and the other in system: admin_group:)
On master this difference is tolerated.

@micszo
Copy link
Member

micszo commented Dec 19, 2017

Also on this branch with a testeditor user I cannot enter Content / Content structure with a set o policies that allow that on master.
screen shot 2017-12-19 at 11 06 08
The policies are:
screen shot 2017-12-19 at 11 08 13

@micszo
Copy link
Member

micszo commented Dec 19, 2017

@webhdx could you confirm the necessary policies for a editor limited to one language?

@lserwatka
Copy link
Member

@webhdx rebase is needed

@webhdx webhdx force-pushed the language_filtering branch 2 times, most recently from c3e4a8f to 1675b61 Compare December 19, 2017 16:10
@micszo micszo requested a review from mnocon December 19, 2017 16:51
@micszo
Copy link
Member

micszo commented Dec 19, 2017

@mnocon we reached a deadlock, please help. I still have the second error which Maciek cannot reproduce. (testing on ezplatform-ee and dev)

@micszo
Copy link
Member

micszo commented Dec 19, 2017

List of policies from Maciek:
image

@mnocon
Copy link
Member

mnocon commented Dec 19, 2017

@micszo @webhdx looks like it works for me - I have created a French language, created a user that is assigned to the Role specified above and I can browse Content -> Content Structure on ezplatform-ee (dev mode). We can go through that tomorrow to double check everything.

@webhdx
Copy link
Contributor Author

webhdx commented Dec 20, 2017

Ok, I managed to reproduce the issue. It's caused by PermissionResolver:
In canUser() it overrides $targets = null when $targets is empty. Later when it checks SubtreeLimitation it expects $targets to be an array.

I've created a bug report: https://jira.ez.no/browse/EZP-28615

cc @alongosz

@webhdx webhdx force-pushed the language_filtering branch from 1675b61 to 2fe72e8 Compare December 20, 2017 09:06
@webhdx
Copy link
Contributor Author

webhdx commented Dec 20, 2017

Further investigation: Whole PR won't work:
In order to check permissions I have to create ContentCreateStruct simulating content user is going to create. In case we are not able to provide ContentType information which is required to perform Permissions check.

For the time being we can only limit language list depending on siteaccess defined languages.

@webhdx webhdx force-pushed the language_filtering branch from 2fe72e8 to 16abaf5 Compare December 20, 2017 10:18
@ezsystems ezsystems deleted a comment from ezrobot Dec 20, 2017
@webhdx webhdx force-pushed the language_filtering branch from 16abaf5 to 6a25cda Compare December 20, 2017 10:24
Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Retest OK with the limitation. 👍
Also I will create improvement for editing content with translations when a language is disabled.

@micszo micszo removed their assignment Dec 20, 2017
@micszo
Copy link
Member

micszo commented Dec 20, 2017

Follow-up improvement https://jira.ez.no/browse/EZP-28620.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants