]> git.wh0rd.org - tt-rss.git/commitdiff
option GLOBAL_ENABLE_LABELS restricts labels globally
authorAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Dec 2005 20:07:47 +0000 (21:07 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Fri, 2 Dec 2005 20:07:47 +0000 (21:07 +0100)
backend.php
config.php-dist
prefs.php

index fd265999602b1ae5820a4a904f8dfc0698c276d2..93199e43e2118eff2936e3ba07d1aece00c39d79 100644 (file)
                                print "</li></ul>";
                        }
 
-                       if (get_pref($link, 'ENABLE_LABELS')) {
+                       if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) {
        
                                $result = db_query($link, "SELECT id,sql_exp,description FROM
                                        ttrss_labels WHERE owner_uid = '$owner_uid' ORDER by description");
 
        if ($op == "pref-labels") {
 
+               if (!GLOBAL_ENABLE_LABELS) { 
+                       return; 
+               }
+
                $subop = $_GET["subop"];
 
                if ($subop == "test") {
index 0686b93127f09cd5863e850a06aff34ec57e0318..851beaeb0c2b182e13cd04e3946e859d68eb8e94 100644 (file)
@@ -45,4 +45,7 @@
        // makes UI more responsive, but eats server memory.    
        // If you experience weird feedlist refresh bugs, disable this option.
 
+       define('GLOBAL_ENABLE_LABELS', true);
+       // Labels are a security risk, so this option can globally disable them for all users.
+
 ?>
index 4be862d1eb77bfde2ef5b92cdf64bd245e49b26b..8c0d29c31bdf00850aa4da977110f94fd020dfca 100644 (file)
--- a/prefs.php
+++ b/prefs.php
@@ -83,7 +83,7 @@
                        onclick="selectTab('feedConfig')">
                <input id="filterConfigTab" class="prefsTab" type="submit" value="Content Filtering"
                        onclick="selectTab('filterConfig')">
-               <? if (get_pref($link, 'ENABLE_LABELS')) { ?>
+               <? if (GLOBAL_ENABLE_LABELS && get_pref($link, 'ENABLE_LABELS')) { ?>
                <input id="labelConfigTab" class="prefsTab" type="submit" value="Label Editor"
                        onclick="selectTab('labelConfig')">
                <? } ?>