Alexander Nicolaysen Sørnes : version: Only show some filter optiosn for admins, as they have no effect for others

Alexander Nicolaysen Sørnes asornes at winehq.org
Sun Nov 22 08:38:23 CST 2009


Module: appdb
Branch: master
Commit: dd8399a861d665a0b85b39c93c78e18a4e8eea6e
URL:    http://source.winehq.org/git/appdb.git/?a=commit;h=dd8399a861d665a0b85b39c93c78e18a4e8eea6e

Author: Alexander Nicolaysen Sørnes <alexander at linux-xqqm.(none)>
Date:   Sun Nov 22 04:14:08 2009 +0100

version: Only show some filter optiosn for admins, as they have no effect for others

---

 include/version_queue.php |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/version_queue.php b/include/version_queue.php
index 0be7ba4..2d1ee55 100644
--- a/include/version_queue.php
+++ b/include/version_queue.php
@@ -265,6 +265,11 @@ class version_queue
     public function objectGetFilterInfo()
     {
         $oFilter = new FilterInterface();
+
+        /* The following filters are only useful for admins */
+        if(!$_SESSION['current']->hasPriv('admin'))
+            return null;
+
         $oFilter->AddFilterInfo('onlyWithoutMaintainers', 'Only show versions without maintainers', array(FILTER_OPTION_BOOL), FILTER_VALUES_OPTION_BOOL, array('false','true'));
         return $oFilter;
     }




More information about the wine-cvs mailing list