Index: server/pifr_server.test
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/server/pifr_server.test,v
retrieving revision 1.17
diff -u -r1.17 pifr_server.test
--- server/pifr_server.test	26 Jan 2010 05:40:05 -0000	1.17
+++ server/pifr_server.test	29 Jan 2010 23:38:39 -0000
@@ -39,11 +39,11 @@
 
     // Create user that has the necessary PIFR permissions.
     $this->admin = $this->drupalCreateUser(array(
-      'pifr add project client',
-      'pifr add test client',
-      'pifr manage environments',
-      'pifr manage clients',
-      'pifr administer',
+      'add pifr project client',
+      'add pifr test client',
+      'manage pifr environments',
+      'manage pifr clients',
+      'administer pifr',
       'access administration pages',
     ));
     $this->drupalLogin($this->admin);
Index: server/pifr_server.manage.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/server/pifr_server.manage.inc,v
retrieving revision 1.38
diff -u -r1.38 pifr_server.manage.inc
--- server/pifr_server.manage.inc	15 Jan 2010 22:22:45 -0000	1.38
+++ server/pifr_server.manage.inc	29 Jan 2010 23:38:39 -0000
@@ -178,10 +178,10 @@
 
   // Associate constant values with textual representation and remove any types that are not avialable to user.
   $form['client']['type']['#options'] = drupal_map_assoc($form['client']['type']['#options'], 'pifr_server_client_type');
-  if (!user_access('pifr add project client')) {
+  if (!user_access('add pifr project client')) {
     unset($form['client']['type']['#options'][PIFR_SERVER_CLIENT_TYPE_PROJECT]);
   }
-  if (!user_access('pifr add test client')) {
+  if (!user_access('add pifr test client')) {
     unset($form['client']['type']['#options'][PIFR_SERVER_CLIENT_TYPE_TEST]);
   }
 
@@ -197,14 +197,14 @@
     '#description' => t('The environment(s) the client will be testing.'),
     '#options' => array(),
     '#default_value' => (isset($client) ? $client['environment'] : array()),
-    '#access' => user_access('pifr add test client'),
+    '#access' => user_access('add pifr test client'),
   );
   $environments = pifr_server_environment_get_all();
   foreach ($environments as $environment) {
     $form['client']['environment']['#options'][$environment['environment_id']] = $environment['title'];
   }
 
-  if (user_access('pifr manage clients')) {
+  if (user_access('manage pifr clients')) {
     $owner = user_load($form['client']['uid']['#value']);
     $form['client']['owner'] = array(
       '#type' => 'textfield',
Index: server/pifr_server.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/server/pifr_server.install,v
retrieving revision 1.46
diff -u -r1.46 pifr_server.install
--- server/pifr_server.install	21 Jan 2010 19:51:17 -0000	1.46
+++ server/pifr_server.install	29 Jan 2010 23:38:39 -0000
@@ -644,3 +644,24 @@
 
   return $ret;
 }
+
+/**
+ * Update role permissions, using map.
+ */
+function pifr_update_6204() {
+  $ret = array();
+
+  $map = array(
+    'pifr add project client' => 'add pifr project client',
+    'pifr add test client' => 'add pifr test client',
+    'pifr manage own client' => 'manage own pifr client',
+    'pifr manage clients' => 'manage pifr clients',
+    'pifr manage environments' => 'manage pifr environments',
+    'pifr manage tests' => 'manage pifr tests',
+  );
+  foreach ($map as $old => $new) {
+    update_sql("UPDATE permission SET perm = REPLACE(perm, '$old', '$new')");
+  }
+
+  return $ret;
+}
Index: server/pifr_server.menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/server/pifr_server.menu.inc,v
retrieving revision 1.14
diff -u -r1.14 pifr_server.menu.inc
--- server/pifr_server.menu.inc	4 Dec 2009 20:29:07 -0000	1.14
+++ server/pifr_server.menu.inc	29 Jan 2010 23:38:39 -0000
@@ -45,7 +45,7 @@
     'title' => 'Tools',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_test_tools_form', 2),
-    'access arguments' => array('pifr manage tests'),
+    'access arguments' => array('manage pifr tests'),
     'type' => MENU_LOCAL_TASK,
     'file' => 'pifr_server.test.inc',
     'weight' => -9,
@@ -56,7 +56,7 @@
     'title' => 'Add',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_environment_form'),
-    'access arguments' => array('pifr manage environments'),
+    'access arguments' => array('manage pifr environments'),
     'file' => 'pifr_server.environment.inc',
     'type' => MENU_LOCAL_TASK,
   );
@@ -64,7 +64,7 @@
     'title' => 'Environment',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_environment_form', 4),
-    'access arguments' => array('pifr manage environments'),
+    'access arguments' => array('manage pifr environments'),
     'file' => 'pifr_server.environment.inc',
     'type' => MENU_CALLBACK,
   );
@@ -72,7 +72,7 @@
     'title' => 'Environment',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_environment_delete_confirm_form', 4),
-    'access arguments' => array('pifr manage environments'),
+    'access arguments' => array('manage pifr environments'),
     'file' => 'pifr_server.environment.inc',
     'type' => MENU_CALLBACK,
   );
@@ -80,14 +80,14 @@
     'title' => 'Environment',
     'page callback' => 'pifr_server_environment_ahah',
     'page arguments' => array(4, 5),
-    'access arguments' => array('pifr manage environments'),
+    'access arguments' => array('manage pifr environments'),
     'file' => 'pifr_server.environment.inc',
     'type' => MENU_CALLBACK,
   );
   $items['admin/pifr/environment/settings'] = array(
     'title' => 'Environment',
     'page callback' => 'pifr_server_environment_settings_ahah',
-    'access arguments' => array('pifr manage environments'),
+    'access arguments' => array('manage pifr environments'),
     'file' => 'pifr_server.environment.inc',
     'type' => MENU_CALLBACK,
   );
@@ -98,7 +98,7 @@
     'title' => 'Edit client',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_manage_client_form', 4),
-    'access arguments' => array('pifr manage clients'),
+    'access arguments' => array('manage pifr clients'),
     'file' => 'pifr_server.manage.inc',
     'type' => MENU_CALLBACK,
   );
@@ -106,7 +106,7 @@
     'title' => 'Request enable client',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_client_enable_confirm_form', 4),
-    'access arguments' => array('pifr manage clients'),
+    'access arguments' => array('manage pifr clients'),
     'file' => 'pifr_server.manage.inc',
     'type' => MENU_CALLBACK,
   );
@@ -114,7 +114,7 @@
     'title' => 'Request enable client',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_client_disable_confirm_form', 4),
-    'access arguments' => array('pifr manage clients'),
+    'access arguments' => array('manage pifr clients'),
     'file' => 'pifr_server.manage.inc',
     'type' => MENU_CALLBACK,
   );
@@ -122,7 +122,7 @@
     'title' => 'Remove client',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_client_remove_confirm_form', 4),
-    'access arguments' => array('pifr manage clients'),
+    'access arguments' => array('manage pifr clients'),
     'file' => 'pifr_server.manage.inc',
     'type' => MENU_CALLBACK,
   );
@@ -132,7 +132,7 @@
     'title' => 'PIFR Clients',
     'page callback' => 'pifr_server_manage_dashboard',
     'page arguments' => array(1),
-    'access arguments' => array('pifr manage own client'),
+    'access arguments' => array('manage own pifr client'),
     'file' => 'pifr_server.manage.inc',
     'type' => MENU_LOCAL_TASK
   );
@@ -146,7 +146,7 @@
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_server_manage_client_form', NULL, 1),
     'access callback' => 'pifr_server_access',
-    'access arguments' => array('pifr add project client', 'pifr add test client'),
+    'access arguments' => array('add pifr project client', 'add pifr test client'),
     'file' => 'pifr_server.manage.inc',
     'type' => MENU_LOCAL_TASK,
     'weight' => -9
Index: server/pifr_server.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/server/pifr_server.module,v
retrieving revision 1.54
diff -u -r1.54 pifr_server.module
--- server/pifr_server.module	15 Jan 2010 22:24:12 -0000	1.54
+++ server/pifr_server.module	29 Jan 2010 23:38:39 -0000
@@ -54,11 +54,11 @@
  * @return boolean Access granted.
  */
 function pifr_server_manage_access($client_id, $account = NULL) {
-  if (user_access('pifr manage clients')) {
+  if (user_access('manage pifr clients')) {
     return TRUE;
   }
 
-  if ($account && user_access('pifr manage own client', $account)) {
+  if ($account && user_access('manage own pifr client', $account)) {
     $client = pifr_server_client_get($client_id);
     if ($account->uid == $client['uid']) {
       return TRUE;
@@ -72,12 +72,12 @@
  */
 function pifr_server_perm() {
   return array(
-    'pifr add project client',
-    'pifr add test client',
-    'pifr manage own client',
-    'pifr manage clients',
-    'pifr manage environments',
-    'pifr manage tests',
+    'add pifr project client',
+    'add pifr test client',
+    'manage own pifr client',
+    'manage pifr clients',
+    'manage pifr environments',
+    'manage pifr tests',
   );
 }
 
@@ -85,7 +85,7 @@
  * Implementation of hook_user().
  */
 function pifr_server_user($op, &$edit, &$account, $category = NULL) {
-  if (!user_access('pifr manage own client')) {
+  if (!user_access('manage own pifr client')) {
     return;
   }
 
Index: pifr.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/pifr.install,v
retrieving revision 1.41
diff -u -r1.41 pifr.install
--- pifr.install	17 Dec 2009 20:47:07 -0000	1.41
+++ pifr.install	29 Jan 2010 23:38:38 -0000
@@ -551,3 +551,16 @@
 
   return $ret;
 }
+
+/**
+ * Update role permissions, using map.
+ */
+function pifr_update_6209() {
+  $ret = array();
+
+  foreach (array('pifr administer' => 'administer pifr') as $old => $new) {
+    update_sql("UPDATE permission SET perm = REPLACE(perm, '$old', '$new')");
+  }
+
+  return $ret;
+}
Index: pifr.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/pifr.module,v
retrieving revision 1.66
diff -u -r1.66 pifr.module
--- pifr.module	31 Dec 2009 20:54:34 -0000	1.66
+++ pifr.module	29 Jan 2010 23:38:38 -0000
@@ -31,7 +31,7 @@
     'description' => 'Manage PIFR configuration and clients.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_admin_dashboard_form'),
-    'access arguments' => array('pifr administer'),
+    'access arguments' => array('administer pifr'),
     'file' => 'pifr.admin.inc',
   );
   $items['admin/pifr/configuration'] = array(
@@ -39,7 +39,7 @@
     'description' => 'Configure PIFR options.',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('pifr_admin_configuration_form'),
-    'access arguments' => array('pifr administer'),
+    'access arguments' => array('administer pifr'),
     'file' => 'pifr.admin.inc',
   );
 
@@ -51,7 +51,7 @@
  */
 function pifr_perm() {
   return array(
-    'pifr administer'
+    'administer pifr',
   );
 }
 
Index: server/views/pifr_server.views_default.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/server/views/pifr_server.views_default.inc,v
retrieving revision 1.26
diff -u -r1.26 pifr_server.views_default.inc
--- server/views/pifr_server.views_default.inc	22 Dec 2009 22:13:52 -0000	1.26
+++ server/views/pifr_server.views_default.inc	29 Jan 2010 23:38:39 -0000
@@ -903,7 +903,7 @@
   ));
   $handler->override_option('access', array(
     'type' => 'perm',
-    'perm' => 'pifr manage own client',
+    'perm' => 'manage own pifr client',
   ));
   $handler->override_option('attachment_position', 'before');
   $handler->override_option('inherit_arguments', TRUE);
@@ -1071,7 +1071,7 @@
   $handler->override_option('arguments', array());
   $handler->override_option('access', array(
     'type' => 'perm',
-    'perm' => 'pifr manage clients',
+    'perm' => 'manage pifr clients',
   ));
   $handler->override_option('path', 'admin/pifr/server');
   $handler->override_option('menu', array(
@@ -1201,7 +1201,7 @@
   ));
   $handler->override_option('access', array(
     'type' => 'perm',
-    'perm' => 'pifr manage environments',
+    'perm' => 'manage pifr environments',
   ));
   $handler->override_option('cache', array(
     'type' => 'none',
Index: client/pifr_client.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/project_issue_file_review/client/pifr_client.module,v
retrieving revision 1.20
diff -u -r1.20 pifr_client.module
--- client/pifr_client.module	4 Dec 2009 22:21:19 -0000	1.20
+++ client/pifr_client.module	29 Jan 2010 23:38:38 -0000
@@ -43,7 +43,7 @@
     'title' => 'Client check',
     'description' => 'Check the configuration of the client server.',
     'page callback' => 'pifr_client_admin_check_configuration',
-    'access arguments' => array('pifr administer'),
+    'access arguments' => array('administer pifr'),
     'file' => 'pifr_client.admin.inc',
   );
 
