[Rt-commit] rtir branch, 2.4-trunk, updated. 611986d7848efc2c6d0d9de3d7dcf55b72175912
Ruslan Zakirov
ruz at bestpractical.com
Fri Nov 13 16:14:19 EST 2009
The branch, 2.4-trunk has been updated
via 611986d7848efc2c6d0d9de3d7dcf55b72175912 (commit)
via bca08250f9a12cfb27fa3d0fbcc13d02cb56ecbb (commit)
via 2d1ba1e6cb4783d78b0ee24105796076cf022523 (commit)
via be08ce6942603a9034f4f11be8e2c6f4faba7f2a (commit)
via 1ec723bb96ad613b3b3c348c07ad8ba3aa7bf20a (commit)
via c213cbd33733e42c110c102b301b9184c2c5abec (commit)
via 32098621d7119c4df37a87dd656c9162bcf202cf (commit)
from 09fc4a88486a0e3c25c6f453cc69228afb67c7d9 (commit)
Summary of changes:
CHANGES | 5 +++++
etc/RTIR_Config.pm | 9 +++++----
html/RTIR/ShowUser | 25 +++++++++++++++++--------
lib/RT/IR.pm | 13 +++++++------
4 files changed, 34 insertions(+), 18 deletions(-)
- Log -----------------------------------------------------------------
commit 32098621d7119c4df37a87dd656c9162bcf202cf
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Nov 13 23:46:11 2009 +0300
delete not-balanced closing </i> tag from format strings
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index a3a153e..b04f7e2 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -204,19 +204,19 @@ Set($RTIRSearchResultFormats, {
ChildReport =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__</I>/TITLE:State',
+ '__CustomField.{_RTIR_State}__/TITLE:State',
__DueRelative__},
ChildInvestigation =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__</I>/TITLE:State',
+ '__CustomField.{_RTIR_State}__/TITLE:State',
__DueRelative__},
ChildBlock =>
q{'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
'<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
- '__CustomField.{_RTIR_State}__</I>/TITLE:State',
+ '__CustomField.{_RTIR_State}__/TITLE:State',
__DueRelative__},
} );
commit c213cbd33733e42c110c102b301b9184c2c5abec
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Thu Jun 4 23:52:22 2009 +0000
make proper overriding of WebNoAuthRegexp
git-svn-id: svn+ssh://svn.bestpractical.com/svn/bps-public/rtir/2.5/trunk@19909 e417ac7c-1bcc-0310-8ffa-8f5827389a85
diff --git a/etc/RTIR_Config.pm b/etc/RTIR_Config.pm
index b04f7e2..fe64680 100644
--- a/etc/RTIR_Config.pm
+++ b/etc/RTIR_Config.pm
@@ -1,7 +1,8 @@
# WebNoAuthRegex - What portion of RT's URLspace should not require
# authentication. Adjust it according to RTIR paths
-Set($WebNoAuthRegex, qr{ /+NoAuth/ }x);
+my $rt_no_auth = RT->Config->Get('WebNoAuthRegex');
+Set($WebNoAuthRegex, qr{ (?: $rt_no_auth | ^/+RTIR/+NoAuth/ ) }x);
# Set the name of the RTIR application.
commit 1ec723bb96ad613b3b3c348c07ad8ba3aa7bf20a
Author: sunnavy <sunnavy at bestpractical.com>
Date: Thu Jun 18 14:52:32 2009 +0000
recheck the cf Constituency if $const is _none
git-svn-id: svn+ssh://svn.bestpractical.com/svn/bps-public/rtir/2.5/trunk@20026 e417ac7c-1bcc-0310-8ffa-8f5827389a85
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 7edbc3d..8a0c052 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -418,7 +418,7 @@ wrap 'RT::ObjectCustomFieldValue::Content',
}
if ( UNIVERSAL::isa( $self, 'RT::Ticket' ) ) {
my $const = $RT::IR::ConstituencyCache{ $self->id };
- unless ( $const ) {
+ if (!$const || $const eq '_none' ) {
my $systicket = RT::Ticket->new($RT::SystemUser);
$systicket->Load( $self->id );
$const = $RT::IR::ConstituencyCache{ $self->id } =
@@ -489,10 +489,9 @@ wrap 'RT::ObjectCustomFieldValue::Content',
sub GetQueueAttribute {
my $queue = shift;
my $attr = shift;
-
if ( ( my $id = $queue->{'_for_ticket'} ) ) {
my $const = $RT::IR::ConstituencyCache{$id};
- unless ($const) {
+ if (!$const || $const eq '_none' ) {
my $ticket = RT::Ticket->new($RT::SystemUser);
$ticket->Load($id);
$const = $RT::IR::ConstituencyCache{$ticket->id}
commit be08ce6942603a9034f4f11be8e2c6f4faba7f2a
Author: Ruslan Zakirov <ruz at bestpractica.com>
Date: Wed Aug 19 22:13:52 2009 +0400
adjust deserialization of IP from value with leading zeroes
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 8a0c052..d7b2907 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -368,18 +368,20 @@ wrap 'RT::ObjectCustomFieldValue::Create',
# strip zero chars(deserialize)
{
+my $re_ip_sunit = qr/[0-1][0-9][0-9]|2[0-4][0-9]|25[0-5]/;
+my $re_ip_serialized = qr/$re_ip_sunit(?:\.$re_ip_sunit){3}/;
my $obj;
wrap 'RT::ObjectCustomFieldValue::Content',
pre => sub { $obj = $_[0] },
post => sub {
return unless $_[-1];
my $val = ref $_[-1]? \$_[-1][0]: \$_[-1];
- return unless $$val =~ /^\s*($RE{net}{IPv4})\s*$/;
+ return unless $$val =~ /^\s*($re_ip_serialized)\s*$/o;
$$val = sprintf "%d.%d.%d.%d", split /\./, $1;
my $large_content = $obj->__Value('LargeContent');
return if !$large_content
- || $large_content !~ /^\s*($RE{net}{IPv4})\s*$/;
+ || $large_content !~ /^\s*($re_ip_serialized)\s*$/o;
my $eIP = sprintf "%d.%d.%d.%d", split /\./, $1;
$$val .= '-'. $eIP unless $$val eq $eIP;
return;
commit 2d1ba1e6cb4783d78b0ee24105796076cf022523
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Wed Sep 9 07:32:36 2009 +0400
* ::States without Queue argument never worked
diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index d7b2907..ed62e71 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -190,7 +190,7 @@ my %STATES = (
sub States {
my %arg = ( Queue => undef, Active => 1, Inactive => 0, @_ );
- my @queues = !$arg{'Queue'} ? ( values %STATES )
+ my @queues = !$arg{'Queue'} ? (@QUEUES)
: ref $arg{'Queue'}? @{ $arg{'Queue'} } : ( $arg{'Queue'} );
my @states;
commit bca08250f9a12cfb27fa3d0fbcc13d02cb56ecbb
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Sat Oct 10 03:48:04 2009 +0400
don't show modify links if we can not modify
diff --git a/html/RTIR/ShowUser b/html/RTIR/ShowUser
index c1c89ec..8c068d6 100644
--- a/html/RTIR/ShowUser
+++ b/html/RTIR/ShowUser
@@ -1,21 +1,30 @@
<span id="showuser-<%$User->id%>">
-% my $url = $RT::WebPath."/RTIR/EditUsername?page=1&id=".$User->id;
+% my $url = RT->Config->Get('WebPath') ."/RTIR/EditUsername?page=1&id=". $User->id;
<& /Elements/ShowUser, User => $User &>
-% if ( $session{'CurrentUser'}->HasRight(Right => 'AdminUsers', Object => $RT::System) ) {
-[<a href="<%$RT::WebPath%>/Admin/Users/Modify.html?id=<%$User->id%>"
- onClick="ahah('<%$url|n%>', 'showuser-<%$User->id|n %>'); return false;"
+% if ( $can_modify ) {
+% my $modify_url = $can_see_admin? RT->Config->Get('WebPath') .'/Admin/Users/Modify.html?id='. $User->id : '#';
+[<a href="<% $modify_url %>"
+ onClick="ahah('<% $url |n%>', 'showuser-<%$User->id|n %>'); return false;"
><&|/l&>Edit</&></a>]
-
% }
-% $m->abort if ($ARGS{'page'});
+% $m->abort if $page;
</span>
<%args>
$id => undef
+$Name => undef
+$page => undef
</%args>
<%init>
my $User = RT::User->new($session{'CurrentUser'});
$User->Load($id);
-if ($ARGS{'Name'}) {
- $User->SetRealName($ARGS{'Name'});
+if ( $Name ) {
+ $User->SetRealName( $Name );
}
+
+my $can_modify = $session{'CurrentUser'}->HasRight(
+ Right => 'AdminUsers', Object => $RT::System,
+);
+my $can_see_admin = $session{'CurrentUser'}->HasRight(
+ Right => 'ShowConfigTab', Object => $RT::System,
+);
</%init>
commit 611986d7848efc2c6d0d9de3d7dcf55b72175912
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Nov 13 23:54:18 2009 +0300
update changelog with cherry picked changes from 2.5
diff --git a/CHANGES b/CHANGES
index 3bf4409..3e96998 100644
--- a/CHANGES
+++ b/CHANGES
@@ -11,6 +11,11 @@ BUGS
* don't set $$skip to zero in SkipTransaction callback as it may
conflict with other users of this callback. Just use return and
as well check asap if the txn is already skipped.
+* make proper overriding of WebNoAuthRegexp
+* recheck Constituency cache if $const is _none
+* adjust deserialization of IP from value with leading zeroes
+* RT::IR::States without Queue argument never worked properly
+* don't show modify user link if user can not modify the user
CHANGES IN 2.4.1
----------------
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list