Reject blacklisted packages on initial submission only.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-02-25 11:17:42 +01:00
parent 09d8128f99
commit 2e1ce869ec

View file

@ -230,15 +230,6 @@ if ($_COOKIE["AURSID"]):
$incoming_pkgdir = INCOMING_DIR . $pkg_name; $incoming_pkgdir = INCOMING_DIR . $pkg_name;
} }
if (!$error) {
# Check if package name is blacklisted.
if (pkgname_is_blacklisted($pkg_name)) {
if (!canSubmitBlacklisted(account_from_sid($_COOKIE["AURSID"]))) {
$error = __( "%s is on the package blacklist, please check if it's available in the official repos.", $pkg_name);
}
}
}
if (!$error) { if (!$error) {
# First, see if this package already exists, and if it can be overwritten # First, see if this package already exists, and if it can be overwritten
$pkg_exists = package_exists($pkg_name); $pkg_exists = package_exists($pkg_name);
@ -254,6 +245,15 @@ if ($_COOKIE["AURSID"]):
} else { } else {
$error = __( "You are not allowed to overwrite the %h%s%h package.", "<b>", $pkg_name, "</b>"); $error = __( "You are not allowed to overwrite the %h%s%h package.", "<b>", $pkg_name, "</b>");
} }
if (!$error) {
# Check if package name is blacklisted.
if (!$pkg_exists && pkgname_is_blacklisted($pkg_name)) {
if (!canSubmitBlacklisted(account_from_sid($_COOKIE["AURSID"]))) {
$error = __( "%s is on the package blacklist, please check if it's available in the official repos.", $pkg_name);
}
}
}
} }
if (!$error) { if (!$error) {