[otrs-cvs] ITSMIncidentProblemManagement/Kernel/Modules AgentTicketPhone.pm, 1.55, 1.56

"CVS commits notifications of OTRS.org" <[email protected]> Fri, 10 May 2013 10:24:23 +0000
Newsgroups gmane.comp.otrs.cvs
Message-ID <[email protected]>
Comments:
Update of /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules
In directory lancelot:/tmp/cvs-serv6974/Kernel/Modules

Modified Files:
	AgentTicketPhone.pm 
Log Message:
Improved permission checks in AgentTicketPhone.

Author: mg

Index: AgentTicketPhone.pm
===================================================================
RCS file: /home/cvs/ITSMIncidentProblemManagement/Kernel/Modules/AgentTicketPhone.pm,v
retrieving revision 1.55
retrieving revision 1.56
diff -2 -u -d -r1.55 -r1.56
--- AgentTicketPhone.pm	26 Mar 2013 14:14:00 -0000	1.55
+++ AgentTicketPhone.pm	10 May 2013 10:24:17 -0000	1.56
@@ -340,4 +340,18 @@
         my $ArticleFrom = '';
         if ( $GetParam{ArticleID} ) {
+
+            my $Access = $Self->{TicketObject}->TicketPermission(
+                Type     => 'ro',
+                TicketID => $Self->{TicketID},
+                UserID   => $Self->{UserID}
+            );
+
+            if ( !$Access ) {
+                return $Self->{LayoutObject}->NoPermission(
+                    Message    => "You need ro permission!",
+                    WithHeader => 'yes',
+                );
+            }
+
             %Article = $Self->{TicketObject}->ArticleGet(
                 ArticleID     => $GetParam{ArticleID},
@@ -1364,4 +1378,16 @@
             )
         {
+            my $Access = $Self->{TicketObject}->TicketPermission(
+                Type     => 'ro',
+                TicketID => $GetParam{LinkTicketID},
+                UserID   => $Self->{UserID}
+            );
+
+            if ( !$Access ) {
+                return $Self->{LayoutObject}->NoPermission(
+                    Message    => "You need ro permission!",
+                    WithHeader => 'yes',
+                );
+            }
 
             my $SourceKey = $GetParam{LinkTicketID};
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log