-
Notifications
You must be signed in to change notification settings - Fork 57
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-29833 : Limiting "Content\Create" to Section disables "Publish" button #787
Conversation
Tool version : PHP CS Fixer 2.7.1 Sandy Pool by Fabien Potencier and Dariusz Ruminski diff --git a/src/lib/Menu/ContentCreateRightSidebarBuilder.php b/src/lib/Menu/ContentCreateRightSidebarBuilder.php
index c3338b8..ba847fe 100644
--- a/src/lib/Menu/ContentCreateRightSidebarBuilder.php
+++ b/src/lib/Menu/ContentCreateRightSidebarBuilder.php
@@ -107,7 +107,6 @@ class ContentCreateRightSidebarBuilder extends AbstractBuilder implements Transl
$canCreate = $this->permissionResolver->canUser('content', 'create', $contentCreateStruct, [$locationCreateStruct]) && $parentContentType->isContainer;
$canPreview = $this->permissionResolver->canUser('content', 'versionread', $contentCreateStruct, [$locationCreateStruct]);
-
$publishAttributes = [
'class' => self::BTN_TRIGGER_CLASS,
'data-click' => '#ezrepoforms_content_edit_publish', |
49a2c1d
to
69cd8e2
Compare
* | ||
* @return \eZ\Publish\API\Repository\Values\Content\ContentCreateStruct | ||
*/ | ||
private function createContentCreateStruct(Location $location, ContentType $contentType, Language $language) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return class could be also typehinted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Also, not sure how all of you are feeling about creating those structs inside menuBuilder instead of passing them as options. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt that it is worth to add a private method, which we can not reuse, rather than add one line. The similar situation is at least in two places.
The main reason to add createContentCreateStruct function was to increase readability of the code. |
69cd8e2
to
953b454
Compare
@pawbuj according to Affects Version/s base needs to be changed to 1.3. Also please rebase afterwards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done |
@micszo yes, sure we should also fix this, but I think that we should have a new task for this in jira. |
@pawbuj we don’t create tickets per affected version. You simply set right target branch (1.3 in your case) and after merge we merge it up to master. |
I mean a new ticket for the button in the modal (screenshot by @micszo ). Target branch is already changed to 1.3. |
@pawbuj there you go https://jira.ez.no/browse/EZP-30001. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
You can merge it up |
…newly created user when space button on the keyboard is used (#787)
Fixes permission check for content creation when rights are limited some section.
Checklist:
$ composer fix-cs
)