- Issue created by @angrytoast
vppr_access
is called by implementations of hook_ENTITY_TYPE_access
like vppr_taxonomy_term_access
. This results in cases like if a form field uses a list of terms for options, on each term view, vppr_access
runs which calls VpprPermissions::permissions()
and loads all vocabularies, per term in the list. This is inefficient and wastes time reloading the vocabularies.
A couple of questions
view
operation? vppr_access
could check to see if the operation is view and return FALSE to return a neutral AccessResult and let other checks determine it.VpprPermissions::permissions
and see that per term view, it loads all vocabularies to generate the permissions list.view
operation in entity access'administer taxonomy'
permission can also run before loading all permissions to avoid loading all vocabulariesActive
1.0
Vocabulary Permissions Per Role