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 commentedHere is the patch. It still has some unresolved issues, but lets see what testbot says.
Comment #3
internetdevels commentedcorrected
Comment #5
xanoRe-roll.
Comment #6
andypostComment #7
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 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 commentedAs suggested in comment #12 changed the two things.
Comment #15
herom commentedthis line isn't necessary after last reroll. please remove.
Comment #16
xanoComment #17
herom commentedComment #18
webchickCommitted and pushed to 8.x. Thanks!