diff options
Diffstat (limited to 'rt/share/html/Admin/Groups')
-rw-r--r-- | rt/share/html/Admin/Groups/CustomFields.html | 48 | ||||
-rwxr-xr-x | rt/share/html/Admin/Groups/GroupRights.html | 119 | ||||
-rw-r--r-- | rt/share/html/Admin/Groups/History.html | 68 | ||||
-rwxr-xr-x | rt/share/html/Admin/Groups/Members.html | 159 | ||||
-rwxr-xr-x | rt/share/html/Admin/Groups/Modify.html | 178 | ||||
-rwxr-xr-x | rt/share/html/Admin/Groups/UserRights.html | 112 | ||||
-rwxr-xr-x | rt/share/html/Admin/Groups/index.html | 126 |
7 files changed, 0 insertions, 810 deletions
diff --git a/rt/share/html/Admin/Groups/CustomFields.html b/rt/share/html/Admin/Groups/CustomFields.html deleted file mode 100644 index af76dcfb1..000000000 --- a/rt/share/html/Admin/Groups/CustomFields.html +++ /dev/null @@ -1,48 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/ObjectCustomFields, %ARGS, ObjectType => 'RT::Group' &> diff --git a/rt/share/html/Admin/Groups/GroupRights.html b/rt/share/html/Admin/Groups/GroupRights.html deleted file mode 100755 index 0c11751cb..000000000 --- a/rt/share/html/Admin/Groups/GroupRights.html +++ /dev/null @@ -1,119 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> -<& /Admin/Elements/GroupTabs, - GroupObj => $GroupObj, - current_tab => 'Admin/Groups/GroupRights.html?id='.$id, - Title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> -<& /Elements/ListActions, actions => \@results &> - - <form method="post" action="GroupRights.html"> - <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" /> - -<&| /Widgets/TitleBox, title => loc('Modify group rights for group [_1]', $GroupObj->Name) &> - -<h1><&|/l&>System groups</&></h1> -<table> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToSystemInternalGroups(); -% while (my $Group = $Groups->Next()) { - <tr align="right"> - <td valign="top"> - <% loc($Group->Type) %> - </td> - <td> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - PrincipalType => 'Group', - Object => $GroupObj &> - </td> - </tr> -% } -</table> -<h1><&|/l&>User defined groups</&></h1> -<table> -% $Groups = RT::Groups->new($session{'CurrentUser'}); -% $Groups->LimitToUserDefinedGroups(); -% while (my $Group = $Groups->Next()) { - <tr align="right"> - <td valign="top"> - <% $Group->Name %> - </td> - <td> - <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, - PrincipalType => 'Group', - Object => $GroupObj &> - </td> - </tr> -% } -</table> - - </&> - <& /Elements/Submit, Label => loc('Modify Group Rights'), Reset => 1 &> - - </form> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - - -if (!defined $id) { - Abort(loc("No Group defined")); -} - -my $GroupObj = RT::Group->new($session{'CurrentUser'}); -$GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id)); - -my $Groups; - -</%INIT> - -<%ARGS> -$id => undef -</%ARGS> diff --git a/rt/share/html/Admin/Groups/History.html b/rt/share/html/Admin/Groups/History.html deleted file mode 100644 index cde7c3f0c..000000000 --- a/rt/share/html/Admin/Groups/History.html +++ /dev/null @@ -1,68 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/GroupTabs, - id => $id, - GroupObj => $GroupObj, - current_subtab => $current_tab, - Title => $title &> - -<& /Ticket/Elements/ShowHistory, - Ticket => $GroupObj, - ShowDisplayModes => 0, -&> - -<%INIT> -my $current_tab = 'Admin/Groups/History.html?id='.$id; -my $GroupObj = new RT::Group($session{'CurrentUser'}); -$GroupObj->Load($id) || Abort("Couldn't load group '$id'"); -my $title = loc("History of the group [_1]", $GroupObj->Name); -</%INIT> -<%ARGS> -$id => '' unless defined $id -</%ARGS> diff --git a/rt/share/html/Admin/Groups/Members.html b/rt/share/html/Admin/Groups/Members.html deleted file mode 100755 index 62bd8c843..000000000 --- a/rt/share/html/Admin/Groups/Members.html +++ /dev/null @@ -1,159 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => loc('RT/Admin/Edit the group [_1]', $Group->Name) &> -<& /Admin/Elements/GroupTabs, GroupObj => $Group, - current_tab => 'Admin/Groups/Members.html?id='.$id, - Title => "RT/Admin/Edit the group ". $Group->Name &> -<& /Elements/ListActions, actions => \@results &> - -<form action="<% RT->Config->Get('WebPath') %>/Admin/Groups/Members.html" method="post"> -<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" /> - -<&| /Widgets/TitleBox, title => loc('Editing membership for group [_1]', $Group->Name) &> - -<table width="100%"> -<tr> -<td> -<h3><&|/l&>Current members</&></h3> -</td> -<td> -<h3><&|/l&>Add members</&></h3> -</td> -</tr> - -<tr> -<td valign="top"> - -% if ($Group->MembersObj->Count == 0 ) { -<em><&|/l&>(No members)</&></em> -% } else { -<&|/l&>Users</&> -% my $Users = $Group->UserMembersObj( Recursively => 0 ); -<%perl> -my @users = sort { lc($a->[0]) cmp lc($b->[0]) } - map { [$m->scomp("/Elements/ShowUser", User => $_), $_] } - @{ $Users->ItemsArrayRef }; -</%perl> -<ul> -% for (@users) { -% my ($rendered, $user) = @$_; -% $UsersSeen{ $user->id } = 1 if $SkipSeenUsers; -<li><input type="checkbox" class="checkbox" name="DeleteMember-<% $user->PrincipalObj->Id %>" value="1" /> -<% $rendered |n%></li> -% } -</ul> -<&|/l&>Groups</&> -<ul> -% my $GroupMembers = $Group->MembersObj; -% $GroupMembers->LimitToGroups(); -% while ( my $member = $GroupMembers->Next ) { -% $GroupsSeen{ $member->MemberId } = 1 if $SkipSeenGroups; -<li><input type="checkbox" class="checkbox" name="DeleteMember-<% $member->MemberId %>" value="1" /> -<% $member->MemberObj->Object->Name %> -% } -</ul> -% } -</td> -<td valign="top"> -<& /Admin/Elements/SelectNewGroupMembers, Name => "AddMembers", Group => $Group, - SkipUsers => \%UsersSeen, SkipGroups => \%GroupsSeen &> -</td> -</tr> -</table> -</&> -<em><&|/l&>(Check box to delete)</&></em> -<& /Elements/Submit, Label => loc('Modify Members'), Reset => 1 &> -</form> - - -<%INIT> - -my $Group = new RT::Group($session{'CurrentUser'}); -$Group->Load($id) || Abort(loc('Could not load group')); - -my (%UsersSeen, %GroupsSeen); -$GroupsSeen{ $Group->id } = 1; # can't be a member of ourself - -my (@results); - -# XXX: safe member id in value instead of name -foreach my $key (keys %ARGS) { - next unless $key =~ /^DeleteMember-(\d+)$/; - - my ($val,$msg) = $Group->DeleteMember($1); - push (@results, $msg); -} - -foreach my $member (grep $_, @AddMembersUsers, @AddMembersGroups) { - - my $principal; - - if ($member =~ /^Group-(\d+)$/) { - $principal = RT::Group->new($session{'CurrentUser'}); - $principal->Load($1); - } elsif ($member =~ /^User-(\d+)$/) { - $principal = RT::User->new($session{'CurrentUser'}); - $principal->Load($1); - } else { - next; - } - - - my ($val, $msg) = $Group->AddMember($principal->PrincipalId); - push (@results, $msg); -} - -</%INIT> - -<%ARGS> -@AddMembersUsers => () -@AddMembersGroups => () -$id => undef -$SkipSeenUsers => 1 -$SkipSeenGroups => 1 -</%ARGS> diff --git a/rt/share/html/Admin/Groups/Modify.html b/rt/share/html/Admin/Groups/Modify.html deleted file mode 100755 index 81b8ca740..000000000 --- a/rt/share/html/Admin/Groups/Modify.html +++ /dev/null @@ -1,178 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => $title &> - -<& /Admin/Elements/GroupTabs, - GroupObj => $Group, - current_tab => $current_tab, - Title => $title &> -<& /Elements/ListActions, actions => \@results &> - - - -<form action="<%RT->Config->Get('WebPath')%>/Admin/Groups/Modify.html" method="post" enctype="multipart/form-data"> - -%unless ($Group->Id) { -<input type="hidden" class="hidden" name="id" value="new" /> -% } else { -<input type="hidden" class="hidden" name="id" value="<%$Group->Id%>" /> -% } -<table> -<tr><td align="right"> -<&|/l&>Name</&>: -</td> -<td><input name="Name" value="<%$Group->Name||''%>" /></td> -</tr> -<tr> -<td align="right"> -<&|/l&>Description</&>:</td><td colspan="3"><input name="Description" value="<%$Group->Description||''%>" size="60" /></td> -</tr> -% my $CFs = $Group->CustomFields; -% while (my $CF = $CFs->Next) { -<tr valign="top"><td align="right"> -<% loc($CF->Name) %>: -</td><td> -<& /Elements/EditCustomField, CustomField => $CF, - Object => $Group, - ($Create ? (NamePrefix => 'Object-RT::Group--CustomField-') - : () )&> -</td></tr> -% } -<tr> -<td colspan="2"> -<input type="hidden" class="hidden" name="SetEnabled" value="1" /> -<input type="checkbox" class="checkbox" name="Enabled" value="1" <%$EnabledChecked%> /> <&|/l&>Enabled (Unchecking this box disables this group)</&><br /> -</td> -</tr> -% $m->callback( %ARGS, GroupObj => $Group, results => \@results ); -</table> -% if ( $Create ) { -<& /Elements/Submit, Label => loc('Create'), Reset => 1 &> -% } else { -<& /Elements/Submit, Label => loc('Save Changes'), Reset => 1 &> -% } -</form> -<%INIT> - -my $current_tab; -my ($title, @results, $Disabled, $EnabledChecked); - -my $Group = RT::Group->new($session{'CurrentUser'}); - -if ($Create) { - $current_tab = 'Admin/Groups/Modify.html?Create=1'; - $title = loc("Create a new group"); -} - -else { - $current_tab = 'Admin/Groups/Modify.html?id='.$id; - if ($id eq 'new' ) { - - my ($create_id, $create_msg) = $Group->CreateUserDefinedGroup(Name => - "$Name"); - unless ($create_id) { - Abort (loc("Group could not be created: [_1]", $create_msg)); - } - $id = $Group->Id; - } - else { - $Group->Load($id) || Abort('Could not load group'); - } - - - if ($id) { - $title = loc("Modify the group [_1]", $Group->Name); - - } - - # If the create failed - else { - $title = loc("Create a new group"); - $Create = 1; - } - -} - -if ($id) { - - my @fields = qw(Description Name ); - my @fieldresults = UpdateRecordObject ( AttributesRef => \@fields, - Object => $Group, - ARGSRef => \%ARGS ); - push (@results,@fieldresults); - push @results, ProcessObjectCustomFieldUpdates( ARGSRef => \%ARGS, Object => $Group ); -} - -#we're asking about enabled on the web page but really care about disabled. -if (defined $Enabled && $Enabled == 1) { - $Disabled = 0; -} -else { - $Disabled = 1; -} -if ( ($SetEnabled) and ( $Disabled != $Group->Disabled) ) { - my ($code, $msg) = $Group->SetDisabled($Disabled); - push @results, $msg; -} - -unless ($Group->Disabled()) { - $EnabledChecked ='checked="checked"'; -} - - -</%INIT> - - -<%ARGS> -$Create => undef -$Name => undef -$Description => undef -$SetEnabled => undef -$Enabled => undef -$id => '' unless defined $id -</%ARGS> diff --git a/rt/share/html/Admin/Groups/UserRights.html b/rt/share/html/Admin/Groups/UserRights.html deleted file mode 100755 index 619a076d0..000000000 --- a/rt/share/html/Admin/Groups/UserRights.html +++ /dev/null @@ -1,112 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> -<& /Admin/Elements/GroupTabs, - GroupObj => $GroupObj, - current_tab => 'Admin/Groups/UserRights.html?id='.$id, - Title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> -<& /Elements/ListActions, actions => \@results &> - - <form method="post" action="UserRights.html"> - <input type="hidden" class="hidden" name="id" value="<% $GroupObj->id %>" /> - -<&| /Widgets/TitleBox, title => loc('Modify user rights for group [_1]', $GroupObj->Name) &> -<table> -% while ( my $Member = $Users->Next ) { -% my $UserObj = $Member->MemberObj->Object; - <tr align="right"> - <td valign="top"><& /Elements/ShowUser, User => $UserObj &></td> - <td><& /Admin/Elements/SelectRights, - PrincipalId => $Member->MemberObj->Id, - PrincipalType => 'User', - Object => $GroupObj, - &></td> - </tr> -% } -</table> -</&> - -<& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &> - -</form> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); - -# {{{ Deal with setting up the display of current rights. - - -#Define vars used in html above - - -if (!defined $id) { - Abort(loc("No Group defined")); -} - -my $GroupObj = RT::Group->new($session{'CurrentUser'}); -$GroupObj->Load($id) || Abort(loc("Couldn't load group [_1]",$id)); - -# Find out which users we want to display ACL selects for -my $Privileged = RT::Group->new($session{'CurrentUser'}); -$Privileged->LoadSystemInternalGroup('Privileged'); -my $Users = $Privileged->MembersObj(); - - - -# }}} - -</%INIT> - -<%ARGS> -$id => undef -$UserString => undef -$UserOp => undef -$UserField => undef -</%ARGS> diff --git a/rt/share/html/Admin/Groups/index.html b/rt/share/html/Admin/Groups/index.html deleted file mode 100755 index 17b760c26..000000000 --- a/rt/share/html/Admin/Groups/index.html +++ /dev/null @@ -1,126 +0,0 @@ -%# BEGIN BPS TAGGED BLOCK {{{ -%# -%# COPYRIGHT: -%# -%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC -%# <jesse@bestpractical.com> -%# -%# (Except where explicitly superseded by other copyright notices) -%# -%# -%# LICENSE: -%# -%# This work is made available to you under the terms of Version 2 of -%# the GNU General Public License. A copy of that license should have -%# been provided with this software, but in any event can be snarfed -%# from www.gnu.org. -%# -%# This work is distributed in the hope that it will be useful, but -%# WITHOUT ANY WARRANTY; without even the implied warranty of -%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -%# General Public License for more details. -%# -%# You should have received a copy of the GNU General Public License -%# along with this program; if not, write to the Free Software -%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -%# 02110-1301 or visit their web page on the internet at -%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html. -%# -%# -%# CONTRIBUTION SUBMISSION POLICY: -%# -%# (The following paragraph is not intended to limit the rights granted -%# to you to modify and distribute this software under the terms of -%# the GNU General Public License and is only of importance to you if -%# you choose to contribute your changes and enhancements to the -%# community by submitting them to Best Practical Solutions, LLC.) -%# -%# By intentionally submitting any modifications, corrections or -%# derivatives to this work, or any other work intended for use with -%# Request Tracker, to Best Practical Solutions, LLC, you confirm that -%# you are the copyright holder for those contributions and you grant -%# Best Practical Solutions, LLC a nonexclusive, worldwide, irrevocable, -%# royalty-free, perpetual, license to use, copy, create derivative -%# works based on those contributions, and sublicense and distribute -%# those contributions and any derivatives thereof. -%# -%# END BPS TAGGED BLOCK }}} -<& /Admin/Elements/Header, Title => $title &> -<& /Admin/Elements/GroupTabs, current_tab => 'Admin/Groups/', - current_subtab => 'Admin/Groups/', - Title => $title &> -<% $caption %>:<br /> - -% unless ( $Groups->Count ) { -<em><&|/l&>No groups matching search criteria found.</&></em> -% } else { - -<& /Elements/CollectionList, - OrderBy => 'Name', - Order => 'ASC', - Rows => 100, - %ARGS, - Format => $Format, - Collection => $Groups, - AllowSorting => 1, - PassArguments => [qw(Format Rows Page Order OrderBy GroupString GroupOp GroupField FindDisabledGroups)], -&> - -% my $ids = join ',', map $_->id, @{ $Groups->ItemsArrayRef }; -% if ( $ids ) { -<div align="right"><em> -(<a href="<% RT->Config->Get('WebPath') %>/Download/Tabular/Group/<% $ids %>/Groups.tsv"> -<&|/l&>Download as a tab-delimited file</&> -</a>)</em></div> -% } - -<br /><br /> -% } - -<form method="post" action="<% RT->Config->Get('WebPath') %>/Admin/Groups/index.html"> -<input type="checkbox" class="checkbox" name="FindDisabledGroups" value="1" <% $FindDisabledGroups? 'checked="checked"': '' |n %> /> <&|/l&>Include disabled groups in listing.</&><br /> -<&|/l&>Find groups whose</&> <& /Elements/SelectGroups &><br /> -<div align="right"><input type="submit" class="button" value="<&|/l&>Go!</&>" /></div> -</form> -<%INIT> -my $Groups = RT::Groups->new($session{'CurrentUser'}); -$Groups->LimitToUserDefinedGroups(); -my $title = loc('Select a group'); -my $caption; - -if ($FindDisabledGroups) { - $Groups->FindAllRows(); -} - -if (length $GroupString) { - $caption = loc("Groups matching search criteria"); - if ($GroupField =~ /^CustomField-(\d+)/) { - $Groups->LimitCustomField( - CUSTOMFIELD => $1, - OPERATOR => $GroupOp, - VALUE => $GroupString, - ); - } - else { - $Groups->Limit( - FIELD => $GroupField, - OPERATOR => $GroupOp, - VALUE => $GroupString, - ); - } -} -else { - $caption = loc("User-defined groups"); -} - -$Format ||= RT->Config->Get('AdminSearchResultFormat')->{'Groups'}; - -</%INIT> -<%ARGS> -$Format => undef, - -$GroupString => '' unless defined $GroupString -$GroupOp => '=' -$GroupField => 'Name' -$FindDisabledGroups => 0 -</%ARGS> |