Committer: jirasup
LJSUP-10831 Ability to see user's uniqsU trunk/htdocs/admin/userlog.bml U trunk/htdocs/support/see_request.bml
Modified: trunk/htdocs/admin/userlog.bml =================================================================== --- trunk/htdocs/admin/userlog.bml 2011-12-20 14:12:11 UTC (rev 20820) +++ trunk/htdocs/admin/userlog.bml 2011-12-20 14:43:47 UTC (rev 20821) @@ -33,6 +33,7 @@ }; my $can_view = LJ::check_priv($remote, 'canview', '*') || LJ::check_priv($remote, 'canview', 'userlog'); + my $can_view_uniq = LJ::check_priv($remote, 'canview', 'uniq'); return $err->("You do not have the necessary privilege to view this page.") unless $can_view || LJ::check_priv($remote, 'canview', 'userloglight') || @@ -171,9 +172,12 @@ my ($ip, $uniq); if (!$can_view) { $ip = '***'; - $uniq = '***'; } else { - $ip = $row->{ip} || "<em>not recorded</em>"; + $ip = $row->{ip} || "<em>not recorded</em>"; + } + if (!$can_view && !$can_view_uniq) { + $uniq = '***'; + } else { $uniq = ($row->{uniq}) ? qq{<a href='$LJ::SITEROOT/admin/uniq.bml?what=$row->{uniq}'> $row->{uniq} </a>} : "<em>not recorded</em>"; Modified: trunk/htdocs/support/see_request.bml =================================================================== --- trunk/htdocs/support/see_request.bml 2011-12-20 14:12:11 UTC (rev 20820) +++ trunk/htdocs/support/see_request.bml 2011-12-20 14:43:47 UTC (rev 20821) @@ -370,9 +370,11 @@ $ret .= "</td></tr>\n"; # uniq - if (LJ::check_priv($remote, 'sysban', 'uniq') || LJ::check_priv($remote, "canview", "userlog")) { - my $uniq = $props->{'uniq'} || "<i>$ML{'.none'}</i>"; - $ret .= "<tr><td valign='bottom' align='right'><b>$ML{'.uniq'}</b></td><td><a href='$LJ::SITEROOT/admin/uniq.bml?what=$uniq'>$uniq</a></td></tr>\n"; + if (LJ::check_priv($remote, 'sysban', 'uniq') || + LJ::check_priv($remote, "canview", "userlog") || + LJ::check_priv($remote, 'canview', 'uniq')) { + my $uniq = $props->{'uniq'} || "<i>$ML{'.none'}</i>"; + $ret .= "<tr><td valign='bottom' align='right'><b>$ML{'.uniq'}</b></td><td><a href='$LJ::SITEROOT/admin/uniq.bml?what=$uniq'>$uniq</a></td></tr>\n"; } # account type