A few more replacements for canManageTeam.
[timetracker.git] / mobile / user_edit.php
index 204e713..b353047 100644 (file)
@@ -35,7 +35,7 @@ import('form.Table');
 import('form.TableColumn');
 
 // Access check.
-if (!ttAccessCheck(right_manage_team)) {
+if (!ttAccessAllowed('manage_users')) {
   header('Location: access_denied.php');
   exit();
 }
@@ -137,7 +137,6 @@ class RateCellRenderer extends DefaultCellRenderer {
     global $assigned_projects;
     $field = new FloatField('rate_'.$table->getValueAtName($row,'id'));
     $field->setFormName($table->getFormName());
-    $field->localize($GLOBALS['I18N']);
     $field->setSize(5);
     $field->setFormat('.2');
     foreach ($assigned_projects as $p) {
@@ -189,7 +188,7 @@ if ($request->isPost()) {
           'status' => $cl_status,
           'rate' => $cl_rate,
           'projects' => $assigned_projects);
-        if (right_assign_roles & $user->rights) {
+        if (in_array('manage_users', $user->rights)) {
           $fields['role'] = $cl_role;
           $fields['client_id'] = $cl_client_id;
         }