Index: wp-includes/capabilities.php
===================================================================
--- wp-includes/capabilities.php	(revision 12314)
+++ wp-includes/capabilities.php	(working copy)
@@ -936,11 +936,18 @@
 			$caps[] = 'read_private_pages';
 		break;
 	case 'unfiltered_upload':
-		if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS == true )
+		if ( defined('ALLOW_UNFILTERED_UPLOADS') && ALLOW_UNFILTERED_UPLOADS )
 			$caps[] = $cap;
 		else
 			$caps[] = 'do_not_allow';
 		break;
+	case 'edit_themes':
+	case 'edit_plugins':
+		if ( defined('ALLOW_FILE_EDIT') && ALLOW_FILE_EDIT )
+			$caps[] = $cap;
+		else
+			$caps[] = 'do_not_allow';
+		break;
 	default:
 		// If no meta caps match, return the original cap.
 		$caps[] = $cap;

