From 94a805321016db8646834d5fb26198ce738d459f Mon Sep 17 00:00:00 2001 From: Callan Barrett Date: Thu, 29 May 2008 17:23:40 +0800 Subject: Disable user package deletion Users can no longer delete packages if they own them, only TUs and devs Signed-off-by: Callan Barrett --- web/lib/pkgfuncs.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'web/lib') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 5031aa4d..c6e7b8e8 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -512,8 +512,7 @@ function package_details($id=0, $SID="") { echo " value='".__("Disown Packages")."'>\n"; } - if ($row["MaintainerUID"] == uid_from_sid($SID) || - account_from_sid($SID) == "Trusted User" || + if (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer") { echo "\n"; @@ -905,7 +904,9 @@ function pkg_search_page($SID="") { print "\n"; print "\n"; print "\n"; - print "\n"; + if (account_from_sid($SID) == "Trusted User" || account_from_sid($SID) == "Developer") { + print "\n"; + } print "\n"; print ""; print ""; -- cgit v1.2.3-24-g4f1b