ProductAccessCheck is a route access checker to ensure a node is a product, used by various attribute and stock routes. However, #2109035: Make access checkers (much) easier to find removed StaticAccessCheckInterface which ProductAccessCheck relies on. We need to figure out what we should be using instead.

CommentFileSizeAuthor
#4 product-access.patch5.17 KBlongwave
#2 product-access.patch3.17 KBlongwave

Comments

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review
StatusFileSize
new3.17 KB

Fixed ProductAccessCheck, also applied it to the product feature routes. We still need to fix the feature route permissions, I think we can do this in the same way we handled attribute route permissions.

longwave’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Let's add some basic tests for this to ensure product tabs show up at the right times and not at the wrong times.

longwave’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new5.17 KB

The test implementation makes me wonder if we should review permissions around the product edit tabs. If a user already has permission to edit the product node, should we just let them edit the attributes, options, features, or stock as well?

  • longwave committed eb7b7f9 on 8.x-4.x
    Issue #2665302 by longwave: ProductAccessCheck uses obsolete...
longwave’s picture

Status: Needs review » Fixed
tr’s picture

The attribute and options tabs still show up for all content types when managing the content type, e.g. /admin/structure/types/manage/article/display

longwave’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.