Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Let's start to convert all calls to user_access() with the new AccountInterface::hasPermission() method.
Part of #2048171: [meta] Replace user_access() calls with $account->hasPermission() wherever possible.
Change records for this issue:
Comment | File | Size | Author |
---|---|---|---|
#16 | drupal_2062039_16.patch | 17.84 KB | Xano |
#16 | interdiff.txt | 970 bytes | Xano |
Comments
Comment #1
InternetDevels CreditAttribution: InternetDevels commentedHere is the patch. It still has some unresolved issues, but lets see what testbot says.
Comment #3
InternetDevels CreditAttribution: InternetDevels commentedcorrected
Comment #5
XanoRe-roll.
Comment #6
andypostComment #7
InternetDevels CreditAttribution: InternetDevels commentedComment #9
andypost7: drupal-user_replace_user_access-20620397.patch queued for re-testing.
EDIT HEAD was broken
Comment #10
xjmComment #11
andypostit was ugly before, no idea how to improve
Comment #12
herom CreditAttribution: herom commentedshouldn't we use $this->currentUser() ?
"Test changing user permissions through the (UI|permissions page).", maybe?
Comment #13
andypostboth nitpicks makes sense
Comment #14
h3rj4n CreditAttribution: h3rj4n commentedAs suggested in comment #12 changed the two things.
Comment #15
herom CreditAttribution: herom commentedthis line isn't necessary after last reroll. please remove.
Comment #16
XanoComment #17
herom CreditAttribution: herom commentedComment #18
webchickCommitted and pushed to 8.x. Thanks!