[Rt-commit] rt branch, 4.4/multiple-asset-owners, created. rt-4.4.1-1-ge020bd1
Shawn Moore
shawn at bestpractical.com
Fri Jun 23 14:13:26 EDT 2017
The branch, 4.4/multiple-asset-owners has been created
at e020bd194812b00a08631815e7658fc2658e6294 (commit)
- Log -----------------------------------------------------------------
commit e020bd194812b00a08631815e7658fc2658e6294
Author: Shawn M Moore <shawn at bestpractical.com>
Date: Thu Apr 20 18:41:35 2017 +0000
Add setting $AssetMultipleOwner to allow many owners on assets
diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 7722558..eda3b5b 100644
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1820,6 +1820,17 @@ Set( $AssetBasicCustomFieldsOnCreate, [ 'foo', 'bar' ] );
# Set($AssetBasicCustomFieldsOnCreate, undef );
+=item C<$AssetMultipleOwner>
+
+By default an asset is limited to a single user as an owner. By setting
+this to a true value, you can allow multiple users and groups as owner.
+If you change this back to a false value while having multiple owners
+set on any assets, RT's behavior may be inconsistent.
+
+=cut
+
+Set($AssetMultipleOwner, 0);
+
=back
=head2 Message box properties
diff --git a/lib/RT/Asset.pm b/lib/RT/Asset.pm
index b2e75bb..4e89b0f 100644
--- a/lib/RT/Asset.pm
+++ b/lib/RT/Asset.pm
@@ -83,6 +83,8 @@ RT::CustomField->RegisterBuiltInGroupings(
'RT::Asset' => [qw( Basics Dates People Links )]
);
+my $multiple_owner = RT->Config->Get('AssetMultipleOwner');
+
# loc('Owner')
# loc('HeldBy')
# loc('Contact')
@@ -93,7 +95,7 @@ for my $role ('Owner', 'HeldBy', 'Contact') {
EquivClasses => ["RT::Catalog"],
SortOrder => $i++,
( $role eq "Owner"
- ? ( Single => 1,
+ ? ( Single => ($multiple_owner ? 0 : 1),
ACLOnlyInEquiv => 1, )
: () ),
);
diff --git a/share/html/Asset/Elements/ShowRoleMembers b/share/html/Asset/Elements/ShowRoleMembers
index 1cb1421..36964c3 100644
--- a/share/html/Asset/Elements/ShowRoleMembers
+++ b/share/html/Asset/Elements/ShowRoleMembers
@@ -53,6 +53,7 @@
<h3><& /Elements/ShowUser, User => $user, Link => 1 &></h3>
% next if $user->id == RT->Nobody->id;
% } else {
+% next if $user->id == RT->Nobody->id;
<h3><a href="#"><& /Elements/ShowUser, User => $user, Link => 0 &>
% if ($Note) {
<span class="note"><% $Note %></span>
-----------------------------------------------------------------------
More information about the rt-commit
mailing list