Hi all,
Here's a new version for TTS2, containing the following
changes:
1. Update from Patch# 1245415 ( Restrict users to their
own info in TTS2)
2. Update from Patch# 1258400 (ticket type: Problem
Report, Change Request or Support Request)
3. Added ticket type to the summary
4. Minor fixes in the summary
5. Added "Show list" in the TTS2 menu
6. Implemented Settings where you can:
- receive notifications when a ticket was assigned to you
- receive notifications when a ticket you created or
was assigned to you, changed or got comment
- receive notifications when a new ticket is created
(when you've got the proper ACL as set in 1.)
The attached .bz2 contains the full TTS2 directory. The
baseline used for this update was fetched from CVS last
week, so it's up-to-date.
REQUIREMENTS:
- Before you can use this patch, you MUST manually add a
column to your database using the SQL command:
ALTER TABLE mgw_tts2 ADD (id_tickettype INT(11) NOT
NULL DEFAULT 0);
You also need the extra function described in Patch#
1296460, and another new function that can be added to
the same file:
function getUserAuth($id_string, $user) {
// Similar to queryRights2_bool(), but check other users
global $conn;
$rsql = "SELECT
id_string,default_value,allow_users,deny_users,allow_groups,deny_groups
FROM mgw_rights2 WHERE
id_string=".$conn->quote($id_string);
if (!$rres = $conn->Execute($rsql)) exit
(showSQLerror($rsql, $conn->ErrorMsg(), __LINE__,
__FILE__));
$rights = $rres->FetchRow();
$gsql = "SELECT groupid FROM mgw_groups_members WHERE
userid=$user";
if (!$gres = $conn->Execute($gsql)) exit
(showSQLerror($gsql, $conn->ErrorMsg(), __LINE__,
__FILE__));
if (!isset($rights["default_value"])) return false;
if ($rights["default_value"]==0) {
if (strpos($rights["allow_users"],",$user,")!==false)
return true;
while(!$gres->EOF) {
$grp = $gres->FetchRow();
if (strpos($rights["allow_groups"],",$group,")!==0)
return true;
}
return false;
} else {
if (strpos($rights["deny_users"],",$user,")!==false)
return false;
while(!$gres->EOF) {
$grp = $gres->FetchRow();
if (strpos($rights["deny_groups"],",$group,")!==0)
return false;
}
return true;
}
return false;
}
Have fun!
New version of TTS2
Logged In: YES
user_id=1309205
Instead of creating a new file with the new functions, you
can also put the attached notifyprefs.inc.php to your
moregroupware/include diretory
New (general) functions for TTS2
Logged In: YES
user_id=109671
For the "alter table" part, why did you not just change the
file definition2.xml as well? I can add it to the patch, but
maybe there's a specific reason?
Franky
Logged In: YES
user_id=1309205
Franky,
At the time I submitted this patch, I didn't know yet what
the function of definition2.xml was, so no reason, just
ignorance :-/
Please make this change in CVS as well if the patch is accepted.
Oscar