class ViewOwnTrackerAccessCheck in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/tracker/src/Access/ViewOwnTrackerAccessCheck.php \Drupal\tracker\Access\ViewOwnTrackerAccessCheck
Access check for user tracker routes.
Hierarchy
- class \Drupal\tracker\Access\ViewOwnTrackerAccessCheck implements AccessInterface
Expanded class hierarchy of ViewOwnTrackerAccessCheck
1 string reference to 'ViewOwnTrackerAccessCheck'
- tracker.services.yml in core/
modules/ tracker/ tracker.services.yml - core/modules/tracker/tracker.services.yml
1 service uses ViewOwnTrackerAccessCheck
- access_check.tracker.view_own in core/
modules/ tracker/ tracker.services.yml - Drupal\tracker\Access\ViewOwnTrackerAccessCheck
File
- core/
modules/ tracker/ src/ Access/ ViewOwnTrackerAccessCheck.php, line 18 - Contains \Drupal\tracker\Access\ViewOwnTrackerAccessCheck.
Namespace
Drupal\tracker\AccessView source
class ViewOwnTrackerAccessCheck implements AccessInterface {
/**
* Checks access.
*
* @param \Drupal\Core\Session\AccountInterface $account
* The currently logged in account.
* @param \Drupal\user\UserInterface $user
* The user whose tracker page is being accessed.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
*/
public function access(AccountInterface $account, UserInterface $user) {
return AccessResult::allowedIf($user && $account
->isAuthenticated() && $user
->id() == $account
->id())
->cachePerUser();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ViewOwnTrackerAccessCheck:: |
public | function | Checks access. |