@ -16,12 +16,14 @@
helpers.displayMenuItem = function(data, index) {
var properties = data.navigation[index].properties;
if (properties) {
if (properties.loggedIn && !data.loggedIn ||
properties.adminOnly && !data.isAdmin ||
properties.installed && properties.installed.search && !data.searchEnabled ||
properties.hideIfPrivate && data.privateUserInfo) {
return false;
}
return true;
};
@ -2,11 +2,18 @@
var navigation = {},
plugins = require('../plugins');
plugins = require('../plugins'),
db = require('../database');
navigation.load = function(callback) {
callback(false, []);
navigation.get = function(callback) {
db.getSortedSetRange('navigation:enabled', 0, -1, function(err, data) {
data = data.map(function(item) {
return JSON.parse(item);
});
callback(err, data);
})