Index: modules/taxonomy/taxonomy.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.admin.inc,v
retrieving revision 1.116
diff -u -p -r1.116 taxonomy.admin.inc
--- modules/taxonomy/taxonomy.admin.inc	20 Nov 2010 06:49:47 -0000	1.116
+++ modules/taxonomy/taxonomy.admin.inc	10 Dec 2010 23:28:27 -0000
@@ -743,7 +743,7 @@ function taxonomy_form_term($form, &$for
     $form['actions']['delete'] = array(
       '#type' => 'submit',
       '#value' => t('Delete'),
-      '#access' => user_access("delete terms in $vocabulary->vid") || user_access('administer taxonomy'),
+      '#access' => user_access("delete terms in $vocabulary->vocabulary_machine_name") || user_access('administer taxonomy'),
       '#weight' => 10,
     );
   }
Index: modules/taxonomy/taxonomy.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.622
diff -u -p -r1.622 taxonomy.module
--- modules/taxonomy/taxonomy.module	30 Nov 2010 19:31:46 -0000	1.622
+++ modules/taxonomy/taxonomy.module	10 Dec 2010 23:28:27 -0000
@@ -73,12 +73,12 @@ function taxonomy_permission() {
   );
   foreach (taxonomy_get_vocabularies() as $vocabulary) {
     $permissions += array(
-      'edit terms in ' . $vocabulary->vid => array(
+      'edit terms in ' . $vocabulary->machine_name => array(
         'title' => t('Edit terms in %vocabulary', array('%vocabulary' => $vocabulary->name)),
       ),
     );
     $permissions += array(
-       'delete terms in ' . $vocabulary->vid => array(
+       'delete terms in ' . $vocabulary->machine_name => array(
          'title' => t('Delete terms from %vocabulary', array('%vocabulary' => $vocabulary->name)),
       ),
     );
@@ -370,7 +370,14 @@ function taxonomy_admin_paths() {
  * Return edit access for a given term.
  */
 function taxonomy_term_edit_access($term) {
-  return user_access("edit terms in $term->vid") || user_access('administer taxonomy');
+  if (user_access('administer taxonomy')) {
+    return TRUE;
+  }
+  if (!isset($term->vocabulary_machine_name)) {
+    $vocabulary = taxonomy_vocabulary_load($term->vid);
+    $term->vocabulary_machine_name = $vocabulary->machine_name;
+  }
+  return user_access("edit terms in $term->vocabulary_machine_name");
 }
 
 /**
