[otrs-cvs] ITSMIncidentProblemManagement/Kernel/Modules AgentTicketPhone.pm, 1.49.2.3, 1.49.2.4

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

Modified Files:
      Tag: rel-3_1
	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.49.2.3
retrieving revision 1.49.2.4
diff -2 -u -d -r1.49.2.3 -r1.49.2.4
--- AgentTicketPhone.pm	26 Mar 2013 16:22:41 -0000	1.49.2.3
+++ AgentTicketPhone.pm	10 May 2013 10:30:18 -0000	1.49.2.4
@@ -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},
@@ -1345,4 +1359,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