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:

Files: 
CommentFileSizeAuthor
#7 drupal-edit_replace_user_access-2061983-7.patch435 bytesrhm50
PASSED: [[SimpleTest]]: [MySQL] 58,486 pass(es).
[ View ]
#7 interdiff-2061983-1-7.txt485 bytesrhm50
#1 drupal-edit_replace_user_access-2061983.patch460 bytesInternetDevels
FAILED: [[SimpleTest]]: [MySQL] 57,853 pass(es), 39 fail(s), and 3 exception(s).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new460 bytes
FAILED: [[SimpleTest]]: [MySQL] 57,853 pass(es), 39 fail(s), and 3 exception(s).
[ View ]

Pretty simple one.

Status:Needs review» Needs work
Issue tags:-CodeSprintCIS

The last submitted patch, drupal-edit_replace_user_access-2061983.patch, failed testing.

Status:Needs work» Needs review

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

The last submitted patch, drupal-edit_replace_user_access-2061983.patch, failed testing.

Component:user system» edit.module

+++ b/core/modules/edit/edit.module
@@ -53,7 +53,7 @@ function edit_permission() {
+  if (!Drupal::request()->attributes->get('_account')->hasPermission('access in-place editing')) {

Use Drupal::currentUser() service https://drupal.org/node/2032447

Issue tags:+php-novice

StatusFileSize
new485 bytes
new435 bytes
PASSED: [[SimpleTest]]: [MySQL] 58,486 pass(es).
[ View ]

Status:Needs work» Needs review

Status:Needs review» Reviewed & tested by the community

This has extensive test coverage, so if it comes back green, it's definitely good to go :) Thanks!

Status:Reviewed & tested by the community» Fixed

Committed cd882b6 and pushed to 8.x. Thanks!

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