зеркало из https://github.com/mozilla/gecko-dev.git
Bug 144565 - describecomponents.cgi shows wrong components when user has
access to only one product Bug 145113 - describecomponents doesn't call quietly_check_login() r=justdave, gerv
This commit is contained in:
Родитель
2e6a55a93f
Коммит
5654419b9e
|
@ -36,13 +36,15 @@ require "CGI.pl";
|
||||||
ConnectToDatabase();
|
ConnectToDatabase();
|
||||||
GetVersionTable();
|
GetVersionTable();
|
||||||
|
|
||||||
|
quietly_check_login();
|
||||||
|
|
||||||
if (!defined $::FORM{'product'}) {
|
if (!defined $::FORM{'product'}) {
|
||||||
# Reference to a subset of %::proddesc, which the user is allowed to see
|
# Reference to a subset of %::proddesc, which the user is allowed to see
|
||||||
my %products;
|
my %products;
|
||||||
|
|
||||||
if (Param("usebuggroups")) {
|
if (Param("usebuggroups")) {
|
||||||
# OK, now only add products the user can see
|
# OK, now only add products the user can see
|
||||||
confirm_login();
|
confirm_login() unless $::userid;
|
||||||
foreach my $p (@::legal_product) {
|
foreach my $p (@::legal_product) {
|
||||||
if (!GroupExists($p) || UserInGroup($p)) {
|
if (!GroupExists($p) || UserInGroup($p)) {
|
||||||
$products{$p} = $::proddesc{$p};
|
$products{$p} = $::proddesc{$p};
|
||||||
|
@ -72,7 +74,7 @@ if (!defined $::FORM{'product'}) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$::FORM{'product'} = (keys %::proddesc)[0];
|
$::FORM{'product'} = (keys %products)[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
my $product = $::FORM{'product'};
|
my $product = $::FORM{'product'};
|
||||||
|
@ -88,8 +90,8 @@ grep($product eq $_ , @::legal_product)
|
||||||
&& exit;
|
&& exit;
|
||||||
|
|
||||||
# Make sure the user is authorized to access this product.
|
# Make sure the user is authorized to access this product.
|
||||||
if (Param("usebuggroups") && GroupExists($product) && !$::userid) {
|
if (Param("usebuggroups") && GroupExists($product)) {
|
||||||
confirm_login();
|
confirm_login() unless $::userid;
|
||||||
UserInGroup($product)
|
UserInGroup($product)
|
||||||
|| DisplayError("You are not authorized to access that product.")
|
|| DisplayError("You are not authorized to access that product.")
|
||||||
&& exit;
|
&& exit;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче