[Rt-commit] rt branch, 4.4-trunk, updated. rt-4.4.4-334-g525375e10a
Jim Brandt
jbrandt at bestpractical.com
Fri Apr 9 16:45:56 EDT 2021
The branch, 4.4-trunk has been updated
via 525375e10a895e90b0acb9862da64d8f4561cf68 (commit)
via 353f384743508ef6d54e1eda8b8e5a416dfc977e (commit)
via 14054242e1ab8a909b65fb625a2419e494494fa6 (commit)
from ce3a983904b29bc4294d4681732d58ff12bed426 (commit)
Summary of changes:
etc/upgrade/4.4.5/content | 15 ++++++++++
lib/RT/CustomRole.pm | 14 +---------
lib/RT/ObjectCustomRole.pm | 13 ++-------
lib/RT/Principal.pm | 53 ++++++++++++++++++++++++++++++++++--
share/html/Admin/Elements/EditRights | 10 +++++++
t/customroles/rights.t | 10 ++-----
6 files changed, 80 insertions(+), 35 deletions(-)
- Log -----------------------------------------------------------------
commit 353f384743508ef6d54e1eda8b8e5a416dfc977e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Sat Sep 8 05:19:26 2018 +0800
Enable previously disabled custom role groups
After 14054242e1, we no longer enable/disable role groups
automatically when enabling/disabling custom roles. To keep the
settings on the underlying role groups consistent, enable any
previously disabled role groups. If a previously disabled
custom role is enabled again, role groups will be enabled and
work as expected.
diff --git a/etc/upgrade/4.4.5/content b/etc/upgrade/4.4.5/content
index 295c21b788..024e3c5147 100644
--- a/etc/upgrade/4.4.5/content
+++ b/etc/upgrade/4.4.5/content
@@ -17,3 +17,18 @@ our @ScripConditions = (
ExecModule => 'ViaInterface',
},
);
+
+our @Final = (
+ sub {
+ my $role_groups = RT::Groups->new( RT->SystemUser );
+ $role_groups->{'find_disabled_rows'} = 1;
+ $role_groups->Limit( FIELD => 'Name', VALUE => 'RT::CustomRole-', OPERATOR => 'LIKE', CASESENSITIVE => 0 );
+ $role_groups->Limit( FIELD => 'Domain', VALUE => '-Role', OPERATOR => 'LIKE', CASESENSITIVE => 0 );
+ $role_groups->LimitToDeleted;
+
+ while ( my $role_group = $role_groups->Next ) {
+ my ( $ret, $msg ) = $role_group->SetDisabled( 0 );
+ RT->Logger->error( "Couldn't enable role group #" . $role_group->id . ": $msg" ) unless $ret;
+ }
+ },
+);
commit 525375e10a895e90b0acb9862da64d8f4561cf68
Merge: ce3a983904 353f384743
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Apr 9 16:37:47 2021 -0400
Merge branch '4.4/custom-role-not-update-groups' into 4.4-trunk
-----------------------------------------------------------------------
More information about the rt-commit
mailing list