[Rt-commit] rt branch, 4.2/migrator-fixes, created. rt-4.2.12-115-g84b0222
Shawn Moore
shawn at bestpractical.com
Mon Mar 21 19:46:42 EDT 2016
The branch, 4.2/migrator-fixes has been created
at 84b02228763304a20edec35cc8547aa9e9c99862 (commit)
- Log -----------------------------------------------------------------
commit 50dea853e373a5c3d3fafe3f201d8b726fda1099
Author: Dustin Graves <dustin at bestpractical.com>
Date: Wed Feb 17 20:16:50 2016 +0000
add AddRight calls to 4.0.1 upgrade step to prevent error message due to failure to canonicalize rights
Fixes: I#31721
diff --git a/etc/upgrade/4.0.1/content b/etc/upgrade/4.0.1/content
index cc3b5f1..851c502 100644
--- a/etc/upgrade/4.0.1/content
+++ b/etc/upgrade/4.0.1/content
@@ -50,6 +50,11 @@ our @Initial = (
sub {
RT->Logger->debug('Removing all Delegate and PersonalGroup rights');
+ # this temporarily tells the system that the rights exist so it can properly canonicalize them
+ RT::System->AddRight(Admin => AdminOwnPersonalGroups => 'Add right for 4.0.1 upgrade steps');
+ RT::System->AddRight(Admin => AdminAllPersonalGroups => 'Add right for 4.0.1 upgrade steps');
+ RT::System->AddRight(Admin => DelegateRights => 'Add right for 4.0.1 upgrade steps');
+
my $acl = RT::ACL->new(RT->SystemUser);
for my $right (qw/AdminOwnPersonalGroups AdminAllPersonalGroups DelegateRights/) {
$acl->Limit( FIELD => 'RightName', VALUE => $right );
commit 3b8ae5b6697ffd26734c9db46b30002af9460193
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Wed Feb 17 23:19:49 2016 +0000
Update detection of find version in configure
Commit 4028723 added code to detect the version of find
because Debian is changing to a newer version of GNU
find with different syntax than the traditional find.
However, the change in that commit no longer worked on
Mac OS X, a BSD-type system.
Modify the find check to use the --version option supported
on GNU and use GNU syntax if found. Otherwise default to the
previous BSD syntax which was the previous setting for all
systems.
diff --git a/configure.ac b/configure.ac
index 44f5384..c671138 100755
--- a/configure.ac
+++ b/configure.ac
@@ -36,21 +36,13 @@ fi
dnl BSD find uses -perm +xxxx, GNU find has deprecated this syntax in favour of
dnl -perm /xxx.
-AC_MSG_CHECKING([whether find supports -perm /x or find -perm +x])
-if find -perm /0100 -not -perm /0100
-then
- FINDPERM="/"
-elif
- find -perm +0100 -not -perm +0100
-then
- FINDPERM="+"
-else
- FINDPERM="na"
-fi
-AC_MSG_RESULT([${FINDPERM}])
-if test "x$FINDPERM" = "xna" ; then
- AC_MSG_WARN([local find program supports neither -perm /0111 nor -perm +0111, make fixperms will not work])
-fi
+AC_MSG_CHECKING([checking version of find])
+AS_IF([find --version 2>&1 | grep 'GNU'],
+ [ FINDPERM="/"
+ AC_MSG_RESULT([configuring for GNU find]) ],
+ [ FINDPERM="+"
+ AC_MSG_RESULT([configuring for BSD find]) ])
+
AC_SUBST([FINDPERM])
dnl WEB_HANDLER
commit 1cac7d3a64b1b3513610069f7b3895e359585475
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Sat Mar 12 16:27:00 2016 +0000
Serialize ObjectClass ObjectId using indirection
Otherwise article classes get applied to the wrong queue (the
one which happens to have had the same ID as one in the database
being serialized). This method is mostly lifted from
ObjectCustomField.
Fixes: I#31804
diff --git a/lib/RT/ObjectClass.pm b/lib/RT/ObjectClass.pm
index c51d9d4..f5a5da6 100644
--- a/lib/RT/ObjectClass.pm
+++ b/lib/RT/ObjectClass.pm
@@ -229,6 +229,18 @@ sub FindDependencies {
$deps->Add( out => $obj );
}
+sub Serialize {
+ my $self = shift;
+ my %args = (@_);
+ my %store = $self->SUPER::Serialize(@_);
+
+ if ($store{ObjectId}) {
+ my $obj = $self->ObjectType->new( RT->SystemUser );
+ $obj->Load( $store{ObjectId} );
+ $store{ObjectId} = \($obj->UID);
+ }
+ return %store;
+}
RT::Base->_ImportOverlays();
commit 06c4c4393d1ce6223aa280f152c5da14bfb6a2fd
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Sat Mar 12 16:43:53 2016 +0000
Serialize ObjectScrip ObjectId using indirection
Otherwise scrip gets applied to the wrong queue (the one which
happens to have had the same ID as one in the database being
serialized). This method is mostly lifted from
ObjectCustomField.
Fixes: I#31805
diff --git a/lib/RT/ObjectScrip.pm b/lib/RT/ObjectScrip.pm
index 8399398..b270d25 100644
--- a/lib/RT/ObjectScrip.pm
+++ b/lib/RT/ObjectScrip.pm
@@ -272,6 +272,19 @@ sub FindDependencies {
}
}
+sub Serialize {
+ my $self = shift;
+ my %args = (@_);
+ my %store = $self->SUPER::Serialize(@_);
+
+ if ($store{ObjectId}) {
+ my $obj = RT::Queue->new( RT->SystemUser );
+ $obj->Load( $store{ObjectId} );
+ $store{ObjectId} = \($obj->UID);
+ }
+ return %store;
+}
+
RT::Base->_ImportOverlays();
1;
commit 152c90c600c19cf470e9202b21b1cbb82a100072
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Sat Mar 12 16:51:44 2016 +0000
Serialize ObjectTopic ObjectId using indirection
Otherwise a topic gets applied to the wrong article (the one
which happens to have had the same ID as one in the database
being serialized). This method is mostly lifted from
ObjectCustomField.
Fixes: I#31803
diff --git a/lib/RT/ObjectTopic.pm b/lib/RT/ObjectTopic.pm
index c9429fd..dfe2bfd 100644
--- a/lib/RT/ObjectTopic.pm
+++ b/lib/RT/ObjectTopic.pm
@@ -212,6 +212,19 @@ sub FindDependencies {
$deps->Add( out => $obj );
}
+sub Serialize {
+ my $self = shift;
+ my %args = (@_);
+ my %store = $self->SUPER::Serialize(@_);
+
+ if ($store{ObjectId}) {
+ my $obj = $self->ObjectType->new( RT->SystemUser );
+ $obj->Load( $store{ObjectId} );
+ $store{ObjectId} = \($obj->UID);
+ }
+ return %store;
+}
+
RT::Base->_ImportOverlays();
1;
commit 84b02228763304a20edec35cc8547aa9e9c99862
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Sat Mar 12 18:03:31 2016 +0000
Avoid breaking rights granted to users when using rt-importer
The "user rights" admin pages issue a SQL query where each
user's ACLEquivalence group name is expected to be "UserEquiv".
However, before this commit, the importer system changed each
group's name from the expected "UserEquiv" to be e.g. "User 99",
since the user ID changes during import. So because the group
name was no longer "UserEquiv", the admin UI was failing to find
the existant but malformed ACL entries.
ACLEquivalence UserEquiv groups stopped using the user's ID in
their name as of 71fcde32, which is exactly when this regression
was introduced. Previously, user rights importing worked because
both the migrator and the ACL subsytems correctly used the Type
of the group, which was "UserEquiv". (The regression was
introduced because ACLs started using Name in place of Type)
Fixes: I#31806
diff --git a/lib/RT/Group.pm b/lib/RT/Group.pm
index c412ba6..81ac325 100644
--- a/lib/RT/Group.pm
+++ b/lib/RT/Group.pm
@@ -1741,13 +1741,12 @@ sub PreInflate {
return;
};
- # Go looking for the pre-existing version of the it
+ # Go looking for the pre-existing version of it
if ($data->{Domain} eq "ACLEquivalence") {
$obj->LoadACLEquivalenceGroup( $data->{Instance} );
return $duplicated->() if $obj->Id;
- # Update the name and description for the new ID
- $data->{Name} = 'User '. $data->{Instance};
+ # Update description for the new ID
$data->{Description} = 'ACL equiv. for user '.$data->{Instance};
} elsif ($data->{Domain} eq "UserDefined") {
$data->{Name} = $importer->Qualify($data->{Name});
-----------------------------------------------------------------------
More information about the rt-commit
mailing list