Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Promotions
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2018 at 15:49 UTC
Updated:
24 Jun 2021 at 15:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lawxen commentedComment #3
lawxen commentedAdd hook_update for uid field
Comment #4
murzConfirm this suggestion, very needed! Patch seems broken with current version of Commerce, I'll try to update it for current version. Or maybe @caseylau - you already have updated version of patch?
Comment #5
murzAs workaround without patching module core, I solve this problem via adding uid field using hook:
Comment #6
jsacksick commentedThis needs tests and we should now be using the EntiyOwnerTrait introduced by #3073942: Commerce entities implementing EntityOwnerInterface should always return a UserInterface object.
Comment #7
jsacksick commentedThis should do the trick.
Comment #8
jsacksick commentedWe were missing the following:
Comment #9
jsacksick commentedThe initial default value for the field is set to the first admin user.
Comment #11
amateescu commentedThese queries need an
accessCheck(FALSE).Comment #12
jsacksick commentedNot sure what to do about the existing "update commerce_promotion" which no longer exists... Should we grant the "update any commerce_promotion" to roles having the "update commerce_promotion" permission?
Comment #13
jsacksick commentedAdded code to grant the "update any commerce_promotion" permission to all roles having the "update commerce_promotion" permission.
Comment #14
jsacksick commented