mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Allow only Trusted Users, Developers, and Maintainers to unflag packages
Currently everyone is allowed to unflag a package as out of date. This should be limited to only the appropriate people for a specific package. Fixes FS#27263 Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
44d8588b63
commit
e8cd6abc6e
3 changed files with 8 additions and 2 deletions
|
@ -728,6 +728,10 @@ function pkg_flag ($atype, $ids, $action=true, $dbh=NULL) {
|
|||
}
|
||||
$q.= " WHERE ID IN (" . implode(",", $ids) . ")";
|
||||
|
||||
if (!$action && ($atype != "Trusted User" && $atype != "Developer")) {
|
||||
$q.= "AND MaintainerUID = " . uid_from_sid($_COOKIE["AURSID"], $dbh);
|
||||
}
|
||||
|
||||
db_query($q, $dbh);
|
||||
|
||||
if ($action) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue