Bug 48299

git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@704 6955db30-a419-402b-8a0d-67ecbb4d7f56
master
vfilippov 2010-04-05 14:57:03 +00:00
parent ca10f3bb03
commit 24a24da06e
1 changed files with 6 additions and 3 deletions

View File

@ -29,14 +29,17 @@ use Bugzilla::Constants;
my $cgi = Bugzilla->cgi;
my $id = $cgi->param('id');
my $user = Bugzilla->user;
# Ugly hack :(
Bugzilla->params->{requirelogin} = 0;
my $user = Bugzilla->login(LOGIN_NORMAL);
my $bug = Bugzilla::Bug->new($id);
my $str;
my $format = lc $cgi->param('format') || 'short';
if (!$user || !$bug->{error} && !$user->can_see_bug($bug->bug_id))
if (!$user || !$bug->{error} && !$user->can_see_bug($bug))
{
# Access denied
$str = "Bug$id: нет доступа";
$str = "Bug $id: нет доступа";
$bug = undef;
}
else