%# BEGIN LICENSE BLOCK %# %# Copyright (c) 2002-2003 Jesse Vincent %# %# This program is free software; you can redistribute it and/or modify %# it under the terms of version 2 of the GNU General Public License %# as published by the Free Software Foundation. %# %# A copy of that license should have arrived with this %# software, but in any event can be snarfed from www.gnu.org. %# %# This program 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. %# %# END LICENSE BLOCK <& /RTFM/Admin/Elements/ClassTabs, id => $id, Title => loc('Modify group rights for Class [_1]', $ClassObj->Name) &> <& /Elements/ListActions, actions => \@results &>
<& /Elements/TitleBoxStart, title => loc('Modify group rights for Class [_1]', $ClassObj->Name) &>

<&|/l&>System groups

% $Groups = RT::Groups->new($session{'CurrentUser'}); % $Groups->LimitToSystemInternalGroups(); % while (my $Group = $Groups->Next()) { % }
<% loc($Group->Type) %> <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, Object => $ClassObj &>

<&|/l&>User defined groups

% $Groups = RT::Groups->new($session{'CurrentUser'}); % $Groups->LimitToUserDefinedGroups(); % while (my $Group = $Groups->Next()) { % }
<% $Group->Name %> <& /Admin/Elements/SelectRights, PrincipalId => $Group->PrincipalId, Object => $ClassObj &>
<& /Elements/TitleBoxEnd &> <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
<%INIT> if (!defined $id) { $m->comp("/RTFM/Elements/Error", Why => loc("No Class defined")); } my $ClassObj = RT::FM::Class->new($session{'CurrentUser'}); $ClassObj->Load($id) || $m->comp("/RTFM/Elements/Error", Why => loc("Couldn't load Class [_1]",$id)); my $Groups; #Update the acls. my ( $ACL); my @results = ProcessACLChanges(\%ARGS); <%ARGS> $id => undef