]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/ttTeamHelper.class.php
Started to populate org_id furing creation of pre-defined roles.
[timetracker.git] / WEB-INF / lib / ttTeamHelper.class.php
index eafc9167c06d4c862218c83af86501e70f2b7b13..8b9d7ed66229fcebe0895522cc6791c93201c983 100644 (file)
@@ -290,7 +290,7 @@ class ttTeamHelper {
     $result = array();
     $mdb2 = getConnection();
 
-    $sql = "select id, name, description, rank, rights from tt_roles where group_id = $user->group_id and rank < $user->rank and status = 1 order by rank";
+    $sql = "select id, name, description, rank, rights from tt_roles where group_id = $user->group_id and org_id = $user->org_id and rank < $user->rank and status = 1 order by rank";
     $res = $mdb2->query($sql);
     $result = array();
     if (!is_a($res, 'PEAR_Error')) {
@@ -348,7 +348,7 @@ class ttTeamHelper {
     $result = array();
     $mdb2 = getConnection();
 
-    $sql = "select id, name, description, rank, rights from tt_roles where group_id = $user->group_id and rank < $user->rank and status = 0 order by rank";
+    $sql = "select id, name, description, rank, rights from tt_roles where group_id = $user->group_id and org_id = $user->org_id and rank < $user->rank and status = 0 order by rank";
     $res = $mdb2->query($sql);
     $result = array();
     if (!is_a($res, 'PEAR_Error')) {