From b69f548065e78d14afcdc91548d73539762f8d93 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 2 Feb 2011 18:03:09 +0100 Subject: Add a package name blacklist. Can be used to blacklist package names for normal users. TUs and developers are not affected. This is especially useful if used together with a cron job that updates the blacklist periodically, e.g. to reject packages which are available in the binary repos (FS#12902). Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'web/html') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 2b11b7b..9ef90a7 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -215,6 +215,15 @@ if ($_COOKIE["AURSID"]): $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) { # First, see if this package already exists, and if it can be overwritten $pkg_exists = package_exists($pkg_name); -- cgit v1.2.3-70-g09d2