%# 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 <& /Admin/RTFM/Elements/ClassTabs, id => $id , Title => loc('Modify user rights for class [_1]', $ClassObj->Name) &> <& /Elements/ListActions, actions => \@results &>
<& /Elements/TitleBoxStart, title => loc('Modify user rights for class [_1]', $ClassObj->Name) &> % while (my $Member = $Users->Next()) { % my $UserObj = $Member->MemberObj->Object(); % my $group = RT::Group->new($session{'CurrentUser'}); % $group->LoadACLEquivalenceGroup($Member->MemberObj); % }
<% $UserObj->Name %> <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId, Object => $ClassObj &>
<& /Elements/TitleBoxEnd &> <& /Elements/Submit, Caption => loc("Be sure to save your changes"), Reset => 1 &>
<%INIT> #Update the acls. my @results = ProcessACLChanges(\%ARGS); # {{{ Deal with setting up the display of current rights. 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)); # 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(); # }}} <%ARGS> $id => undef $UserString => undef $UserOp => undef $UserField => undef