Needs work
Project:
Drupal core
Version:
main
Component:
workspaces.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 May 2021 at 14:38 UTC
Updated:
21 Jul 2022 at 07:45 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #3
mglamanComment #4
manojithape commentedVerified and tested patch MR !654 i.e. https://git.drupalcode.org/project/drupal/-/merge_requests/654.patch on the drupal 9.3.x-dev version. Patch applied successfully and looks good to me.
Testing Steps:
Testing Results:
After applying the patch "Publish Content" option not displayed if the user has no permission.
Please refer attached Before patch and After patch screenshot images for reference.
Moving this ticket to RTBC.
Comment #5
manojithape commentedComment #6
gauravvvv commentedShould we hide the "Publish Content" button if there are no changes to publish?.
Adding screen recording for reference.
Comment #7
larowlan@Gauravmahlawat can you open a separate issue for that, nice pick up.
As this is a bug report, we need a test demonstrating the bug so that we can be certain it stays fixed
Comment #8
gauravvvv commented@larowlan, I have created a seprate follow-up issue for the same. https://www.drupal.org/project/drupal/issues/3218729
Comment #9
paulocsComment #10
paulocsI updated the branch and added tests to it.
Comment #11
gabriel.abdalla commentedHi, changes look good.
Steps performed:
1. Installed 9.3.x-dev version with Umami profile.
2. Enabled module Workspace.
3. Granted permissions to Author role as specified in the issue.
4. Logged in as Author user and created Basic page content. Issue reproduced, "Publish Content" button was visible.
5. Switched to branch 3213208-do-not-show with new code.
6. Code Review on changed files:
--- (a) src/WorkspaceListBuilder.php
--- (b) tests/src/FunctionalJavascript/WorkspaceToolbarIntegrationTest.php
7. Run PHPCS against changed files with standards Drupal and DrupalPractice. No issues introduced in code changes.
8. Tested again with fixes (Admin and Author users) and it's working as expected. Images attached.
Comment #12
mglamanTests were added, removing tag
Comment #13
keen-on.digital commentedI have tested this patch.
After applying the patch, visibility of 'Publish content' button works properly.
But still, users can publish the content by switching into Live workspace even though they do not have 'Administer workspaces' permission.
Comment #14
quietone commentedThis needs an issue summary update. Screenshots of before and after, placed in the Issue Summary would also help a reviewer.
I read through the issue and did not see a review of the code or the test. Setting back to NR for that.
Also, that previous comment suggests there is more work to do here. I'll leave that decision to those working on this.
Comment #15
keen-on.digital commentedI have modified the patch and included more detailed user permission to access and manage workspaces.
Comment #16
keen-on.digital commentedUpdated patch file for advanced workspace permissions.
Comment #17
chetanbharambe commentedHi @keen-on.digital,
Above Patch #16 test cases are getting failed.
Patch not applied successfully and not working as expected.
Testing Steps:
# Goto: Appearance: Apply Seven theme
# Goto: Extend -> Install Workspace Module
# Give the permission to Author role as mentioned in the issue summary
# Login as author user and created content on stage.
# Try to deploy newly created content by clicking on the "Publish Content" option.
# Observe the "Access denied" page displayed because the author user has no permission to publish.
# Now apply the patch and verify the "Publish Content" option not displayed if the user has no permission.
Expected Results:
# After applying the patch, the "Publish Content" option is not displayed if the user has no permission.
Actual Results:
# Currently, the "Publish Content" option is displayed.
Please refer attached screenshots for the same.
Not working as expected.
Can be a move to Needs Work.
Comment #18
yogeshmpawarWorking on re-roll.
Comment #19
yogeshmpawarRe-rolled the patch & removed some extra white trailing spaces which give warnings.
Comment #20
yogeshmpawarResolved custom commands failures & added an interdiff.
Comment #22
amateescu commented@keen-on.digital, adding additional workspace permissions is not in scope of this issue, please open a new issue so it can be discussed properly because it's a feature request.
Comment #23
vikashsoni commentedApplied patch #19 working fine after patch publish button has gone if user not access
for ref sharing screenshot .........
Comment #26
quietone commented@vikashsoni, the comment before yours asked for changes to the patch, and this issue was at NW, there was no need to add screenshots. Therefor, credit has been removed per How is credit granted for Drupal core issues.