I am reporting https://www.drupal.org/node/2122195 to moderators because on this page it says:

Sometimes just relying on permissions and/or roles is not sufficient and you need to do custom access checking on routes. To achieve this, implement a class with AccessCheckInterface and use that to check access.

However the provided example does not implement anything. I looked at several examples in core and they seem to all use implements AccessInterface. So does this mean there is a typo here.

If it should in fact AccessInterface, there is one more issue. AccessInterface seems to be redundant now:


/**
 * @file
 * Contains \Drupal\Core\Routing\Access\AccessInterface.
 */

namespace Drupal\Core\Routing\Access;

/**
 * An access check service determines access rules for particular routes.
 */
interface AccessInterface {

  // @todo Remove this interface since it no longer defines any methods?
  // @see https://drupal.org/node/2266817.

}

Remaining tasks

Comments

jhodgdon’s picture

Title: Moderation report for Access checking on routes » Access checking on routes page needs editing
Category: Task » Bug report
Issue tags: +d8docs, +developer

Thanks for the report.

jp.stacey’s picture

Issue summary: View changes

I've edited the description of this ticket to describe the two separate tasks I think are necessary here.

Right now, the class in the documentation does implement AccessInterface, so that might be a recent change. Either way I've struck it out in the description. But the task to rewrite the documentation when #2266817: Deprecate empty AccessInterface and remove usages is complete, is actually part of that other issue.

So I think this issue could be closed as a combination of already-done and is-now-a-duplicate. We could maybe mention it in passing on #2266817 too.

jp.stacey’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)
Related issues: +#2266817: Deprecate empty AccessInterface and remove usages
jp.stacey’s picture

As it's been two weeks since I proposed closing this, I'm doing so now. I'll reference it on the other issue.