diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-06-07 00:56:06 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-07 00:56:06 -0700 |
commit | 43a06151e47d2c59b833cbd8c26d97865ee850b6 (patch) | |
tree | 42c51d94e7fa265461b508d061562be204ccc2c1 /rt/share/html/Admin/Queues/UserRights.html | |
parent | 6587f6ba7d047ddc1686c080090afe7d53365bd4 (diff) |
starting to work...
Diffstat (limited to 'rt/share/html/Admin/Queues/UserRights.html')
-rwxr-xr-x | rt/share/html/Admin/Queues/UserRights.html | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/rt/share/html/Admin/Queues/UserRights.html b/rt/share/html/Admin/Queues/UserRights.html index b45c9968e..a7980dcbf 100755 --- a/rt/share/html/Admin/Queues/UserRights.html +++ b/rt/share/html/Admin/Queues/UserRights.html @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -46,44 +46,23 @@ %# %# END BPS TAGGED BLOCK }}} <& /Admin/Elements/Header, Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &> -<& /Admin/Elements/QueueTabs, id => $id, - QueueObj => $QueueObj, - current_tab => $current_tab, - Title => loc('Modify user rights for queue [_1]', $QueueObj->Name) &> +<& /Elements/Tabs &> <& /Elements/ListActions, actions => \@results &> - <form method="post" action="UserRights.html"> - <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" /> - - -<table> -% $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results ); -% while (my $Member = $Users->Next()) { -% my $UserObj = $Member->MemberObj->Object(); -% my $group = RT::Group->new($session{'CurrentUser'}); -% $group->LoadACLEquivalenceGroup($Member->MemberObj); - <tr align="right"> - <td valign="top"><& /Elements/ShowUser, User => $UserObj &></td> - <td> - <& /Admin/Elements/SelectRights, PrincipalId=> $group->PrincipalId, - Object => $QueueObj &> - </td> - </tr> -% } - </table> - - <& /Elements/Submit, Label => loc('Modify User Rights'), Reset => 1 &> - - </form> - -<%INIT> - - #Update the acls. - my @results = ProcessACLChanges(\%ARGS); +<form method="post" action="UserRights.html" name="ModifyUserRights" id="ModifyUserRights"> + <input type="hidden" class="hidden" name="id" value="<% $QueueObj->id %>" /> -# {{{ Deal with setting up the display of current rights. +%# XXX TODO put this somewhere more reasonable +% $m->callback( %ARGS, QueueObj => $QueueObj, results => \@results ); + <& /Admin/Elements/EditRights, Context => $QueueObj, Principals => \@principals &> + + <& /Elements/Submit, Label => loc('Save Changes') &> +</form> +<%INIT> +# Update the acls. +my @results = ProcessACLs(\%ARGS); if (!defined $id) { Abort(loc("No Queue defined")); @@ -92,16 +71,7 @@ if (!defined $id) { my $QueueObj = RT::Queue->new($session{'CurrentUser'}); $QueueObj->Load($id) || Abort(loc("Couldn't load queue [_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(); - - - -# }}} -my $current_tab; -$current_tab = 'Admin/Queues/UserRights.html?id='.$QueueObj->id; +my @principals = GetPrincipalsMap($QueueObj, 'Users'); </%INIT> <%ARGS> |