--- user.inc	2008-08-20 14:20:54.000000000 -0400
+++ user.patched.inc	2008-08-20 14:18:34.000000000 -0400
@@ -41,6 +41,18 @@ function install_get_rid($name) {
  * Set the permission for a certain role.
  */
 function install_set_permissions($rid, $perms) {
+  //retrieve the currently set permissions
+  $result = db_query("SELECT p.perm FROM {role} r INNER JOIN {permission} p ON p.rid = r.rid WHERE r.rid = %d ", $rid);
+  $existing_perms = array();
+  while ($row = db_fetch_object($result)) {
+    $existing_perms += explode(', ', $row->perm);
+  }
+  //if this role already has permissions, merge them with the new permissions being set
+  if (count($existing_perms) > 0) { 
+    $perms = array_unique(array_merge($perms, (array)$existing_perms));
+  }
+
+  //update the permissions
   db_query('DELETE FROM {permission} WHERE rid = %d', $rid);
   db_query("INSERT INTO {permission} (rid, perm) VALUES (%d, '%s')", $rid, implode(', ', $perms));
 }
