Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Use $account from $reqeust
Comment | File | Size | Author |
---|---|---|---|
#10 | 2064697-remove-user_access-10.patch | 1.02 KB | Gábor Hojtsy |
#1 | 2064697-remove-user_access-1.patch | 1.12 KB | vijaycs85 |
Comments
Comment #1
vijaycs85Initial patch...
Comment #3
vijaycs85#1: 2064697-remove-user_access-1.patch queued for re-testing.
Comment #5
Gábor HojtsyFails with
Fatal error: Call to a member function getString() on a non-object in /var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/config_translation/lib/Drupal/config_translation/Tests/ConfigTranslationUITest.php on line 379
Looks like some other issue in the module? Caused by core changes.
Comment #6
vijaycs85#1: 2064697-remove-user_access-1.patch queued for re-testing.
Comment #8
vijaycs85blocked by #2062151: Create a current user service to ensure that current account is always available and @dawehner pointed out #2048223: Add $account argument to AccessCheckInterface::access() method and use the current_user service which is more generic fix for AccessCheck.
Comment #9
YesCT CreditAttribution: YesCT commentedunpostponing since #2062151: Create a current user service to ensure that current account is always available is in.
Not sure if we should wait additionally on #2048223: Add $account argument to AccessCheckInterface::access() method and use the current_user service. It's an api change... and might not be close to being done.
Comment #10
Gábor HojtsyRerolled at least with Drupal::currentUser(). I think this is a fine interim step if we want to get rid of user_access() sooner.
Comment #12
tstoeckler#10: 2064697-remove-user_access-10.patch queued for re-testing.
Comment #13
tstoecklerLet's see if this passes now. BTW, I also included this fix in #2085925: Autogenerate config entity translation mapping as much as is sane. (Sorry, couldn't resist.)
Comment #14
Gábor HojtsyMarking duplicate on #2085925: Autogenerate config entity translation mapping as much as is sane which has better coding style solution for this.