X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditRights;h=bd861310f07de35ecfcf7d25afdc6a4ace9b81ae;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hp=e673593135ab9d06b06e26a7adc4e71a5506636b;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;p=freeside.git diff --git a/rt/share/html/Admin/Elements/EditRights b/rt/share/html/Admin/Elements/EditRights index e67359313..bd861310f 100644 --- a/rt/share/html/Admin/Elements/EditRights +++ b/rt/share/html/Admin/Elements/EditRights @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -51,8 +51,6 @@ $Principals $AddPrincipal => undef <%init> -use Scalar::Util qw(blessed); - # Let callbacks get at principals and context before we do anything with them $m->callback( Principals => $Principals, Context => $Context ); @@ -66,6 +64,18 @@ unless ( $AddPrincipal ) { $AddPrincipal = 'user'; # loc } } + +my $anchor = $DECODED_ARGS->{Anchor} || ''; +if ($anchor =~ /AddPrincipal/) { + for my $type ("group", "user") { + my $record = _ParseACLNewPrincipal($DECODED_ARGS, $type) + or next; + if ($record->PrincipalId) { + $anchor = "#acl-" . $record->PrincipalId; + last; + } + } +} %# Principals is an array of arrays, where the inner arrays are like: %# [ 'Category name' => $CollectionObj => 'DisplayColumn' => 1 ] @@ -74,16 +84,40 @@ unless ( $AddPrincipal ) {
+ +