Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bestpractical/rt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Vincent <jesse@bestpractical.com>2001-06-25 12:19:40 +0400
committerJesse Vincent <jesse@bestpractical.com>2001-06-25 12:19:40 +0400
commite8f0b739557d15afee56a29c5db636bb7fa81b70 (patch)
tree84dbb9c4b7425ce43a50eabc5cb50d15890747af
parent19a85a8d50c5c026b6be0606915d533f9fd9c2ce (diff)
Fixed bug in Ticket.pm -> _Links that caused it to return an errorrt-2.0.0.rc2
rather than an empty links object if permission denied. Bumped version to RC2
-rwxr-xr-xMakefile2
-rwxr-xr-xlib/RT/Ticket.pm8
2 files changed, 3 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 20c03052c8..efb096700c 100755
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ PERL = /usr/bin/perl
RT_VERSION_MAJOR = 2
RT_VERSION_MINOR = 0
-RT_VERSION_PATCH = 0-RC1
+RT_VERSION_PATCH = 0-RC2
RT_VERSION = $(RT_VERSION_MAJOR).$(RT_VERSION_MINOR).$(RT_VERSION_PATCH)
diff --git a/lib/RT/Ticket.pm b/lib/RT/Ticket.pm
index 8252b12545..d1f6424d2a 100755
--- a/lib/RT/Ticket.pm
+++ b/lib/RT/Ticket.pm
@@ -1734,13 +1734,9 @@ sub _Links {
my $field = shift;
my $type =shift || "";
- unless ($self->CurrentUserHasRight('ShowTicket')) {
- return (0, "Permission Denied");
- }
-
- unless (exists $self->{"$field$type"}) {
+ $self->{"$field$type"} = new RT::Links($self->CurrentUser);
+ if ($self->CurrentUserHasRight('ShowTicket')) {
- $self->{"$field$type"} = new RT::Links($self->CurrentUser);
$self->{"$field$type"}->Limit(FIELD=>$field, VALUE=>$self->URI);
$self->{"$field$type"}->Limit(FIELD=>'Type', VALUE=>$type) if ($type);
}