X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FAdmin%2FElements%2FEditRights;h=a2d40303767e29ded36bc1ebb969db77092eb70c;hb=HEAD;hp=e673593135ab9d06b06e26a7adc4e71a5506636b;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git diff --git a/rt/share/html/Admin/Elements/EditRights b/rt/share/html/Admin/Elements/EditRights index e67359313..a2d403037 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-2019 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 ) {
+ +