mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
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 <archlinux@cryptocrack.de>
This commit is contained in:
parent
881bfcced4
commit
b69f548065
4 changed files with 47 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue