Closed (fixed)
Project:
Profile
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2016 at 22:40 UTC
Updated:
15 May 2017 at 20:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
nikathoneThe call is being done inside \Drupal\Core\Entity\EntityAccessControlHandler::access(), so no need for profile module to duplicate this I think. On the other hand I would say that the documentation and arguments for the hook inside profile.api.php are wrong. I had to declare my hook like
mymodule_profile_access(Drupal\profile\Entity\Profile $profile, $op, Drupal\Core\Session\AccountInterface $account)and return\Drupal\Core\Access\AccessResultInterfaceinstead of bool for it to work. I don't know if I should create another issue for this or upload the patch here.Comment #3
nedjoThis hook is covered by core, see hook_ENTITY_TYPE_access(). Since this is the only function in profile.api.php, the file can be removed.
Comment #4
Alka Kumari commentedComment #5
Alka Kumari commentedRemoved profile.api.php from the module as it is not required.
Comment #6
kscheirerlooks good
Comment #7
Alka Kumari commentedComment #9
mglamanThanks for cleanup, everyone!