-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
taxonomy_term_edit_access() doesn't exist #1
Comments
I think taxonomy_term_access() can be used in its place. index 7826aa7..13792c3 100644
--- a/modules/callbacks.inc
+++ b/modules/callbacks.inc
@@ -799,7 +799,7 @@ function entity_plus_metadata_taxonomy_access($op, $entity = NULL, $account = NU
if ($entity_plus_type == 'taxonomy_vocabulary') {
return user_access('administer taxonomy', $account);
}
- if (isset($entity) && $op == 'update' && !isset($account) && taxonomy_term_edit_access($entity)) {
+ if (isset($entity) && $op == 'update' && !isset($account) && taxonomy_term_access($entity, $op)) {
return TRUE;
}
if (user_access('administer taxonomy', $account) || user_access('access content', $account) && $op == 'view') {``` |
@aaronlphillips the only problem is that for some reason |
@herbdool good point. I also just noticed that I had my parameters flipped for Once these changes make it into core, then it might be safe to rely on the taxonomy module to determine access. |
I think this will work: diff --git a/modules/callbacks.inc b/modules/callbacks.inc
index 7826aa7..f32ad23 100644
--- a/modules/callbacks.inc
+++ b/modules/callbacks.inc
@@ -799,7 +799,7 @@ function entity_plus_metadata_taxonomy_access($op, $entity = NULL, $account = NU
if ($entity_plus_type == 'taxonomy_vocabulary') {
return user_access('administer taxonomy', $account);
}
- if (isset($entity) && $op == 'update' && !isset($account) && taxonomy_term_edit_access($entity)) {
+ if (isset($entity) && $op == 'update' && !isset($account) && user_access("edit terms in {$entity->vocabulary}")) {
return TRUE;
}
if (user_access('administer taxonomy', $account) || user_access('access content', $account) && $op == 'view') {``` |
Looks like
taxonomy_term_edit_access()
was removed after Drupal 7. In lineentity_plus/modules/callbacks.inc
Line 802 in b8b3f13
Not clear why it was removed but perhaps can just add directly:
user_access("edit terms in {$term->vid}")
The text was updated successfully, but these errors were encountered: