Browse Source

fix SetOwner - ACL caching is still broken, beware

master
Michael van Elst 23 years ago committed by Ralf S. Engelschall
parent
commit
cf55620f79
  1. 56
      rt/rt.patch
  2. 2
      rt/rt.spec

56
rt/rt.patch

@ -47,8 +47,8 @@
% }
<%INIT>
use URI::URL;
--- etc/RT_Config.pm.in.orig Mon Mar 24 17:38:40 2003
+++ etc/RT_Config.pm.in Fri Apr 4 16:06:52 2003
--- etc/RT_Config.pm.dist Mon Apr 7 12:02:13 2003
+++ etc/RT_Config.pm Mon Apr 7 12:03:09 2003
@@ -262,7 +262,8 @@
# $RTLogoURL points to the URL of the RT logo displayed in the web UI
@ -59,8 +59,8 @@
# if TrustHTMLAttachments is not defined, we will display them
# as text. This prevents malicious HTML and javascript from being
--- html/Elements/Header.orig Mon Mar 24 17:38:40 2003
+++ html/Elements/Header Fri Apr 4 16:02:16 2003
--- html/Elements/Header.dist Mon Apr 7 12:03:42 2003
+++ html/Elements/Header Mon Apr 7 12:11:40 2003
@@ -40,9 +40,10 @@
"
% }
@ -81,8 +81,8 @@
<%INIT>
$r->header_out('Pragma' => 'no-cache');
--- html/Elements/Login.orig Mon Mar 24 17:38:40 2003
+++ html/Elements/Login Wed Apr 2 21:17:21 2003
--- html/Elements/Login.dist Mon Apr 7 12:01:40 2003
+++ html/Elements/Login Mon Apr 7 12:10:10 2003
@@ -86,12 +86,13 @@
If you've forgotten your username or password, RT can <A
href="/NoAuth/Reminder.html">send you a reminder</a>.
@ -98,3 +98,47 @@
<%ARGS>
$user => ""
$pass => undef
--- lib/RT/Ticket_Overlay.pm.dist Mon Apr 7 12:15:43 2003
+++ lib/RT/Ticket_Overlay.pm Mon Apr 7 11:54:51 2003
@@ -3024,10 +3024,14 @@
# Delete the owner in the owner group, then add a new one
# TODO: is this safe? it's not how we really want the API to work
# for most things, but it's fast.
- my ($del_id, $del_msg) = $self->OwnerGroup->MembersObj->First->Delete();
- unless ($del_id) {
+ #
+ # it is neither safe nor working -- mlelstv
+ # -> find old owner, add new owner, modify ticket, remove old owner
+
+ my ( $old_owner ) = $self->OwnerGroup->MembersObj->First;
+ unless ($old_owner) {
$RT::Handle->Rollback();
- return(0, $self->loc("Could not change owner. "). $del_msg);
+ return(0, $self->loc("Could not find owner. "));
}
my ( $add_id, $add_msg ) = $self->OwnerGroup->_AddMember(
@@ -3035,7 +3039,7 @@
InsideTransaction => 1 );
unless ($add_id) {
$RT::Handle->Rollback();
- return(0, $self->loc("Could not change owner. "). $add_msg);
+ return(0, $self->loc("Could not add owner. "). $add_msg);
}
# We call set twice with slightly different arguments, so
@@ -3051,7 +3055,13 @@
unless ($val) {
$RT::Handle->Rollback;
- return(0, $self->loc("Could not change owner. "). $msg);
+ return(0, $self->loc("Could not set owner. "). $msg);
+ }
+
+ my ($del_id, $del_msg) = $old_owner->Delete();
+ unless ($del_id) {
+ $RT::Handle->Rollback();
+ return(0, $self->loc("Could not remove owner. "). $del_msg);
}
$RT::Handle->Commit();

2
rt/rt.spec

@ -47,7 +47,7 @@ Distribution: OpenPKG [EVAL]
Group: Database
License: GPL
Version: %{V_here}
Release: 20030404
Release: 20030407
# package options
%option with_color_primary 336699

Loading…
Cancel
Save