Skip to content
This repository has been archived by the owner on Aug 30, 2021. It is now read-only.

Commit

Permalink
Fix Karma and Menus
Browse files Browse the repository at this point in the history
  • Loading branch information
amoshaviv committed Apr 28, 2014
1 parent 14f5d06 commit 7c0078c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion karma.conf.js
Expand Up @@ -12,7 +12,7 @@ module.exports = function(config) {
frameworks: ['jasmine'],

// List of files / patterns to load in the browser
files: applicationConfiguration.assets.lib.concat(applicationConfiguration.assets.js, applicationConfiguration.assets.tests),
files: applicationConfiguration.assets.lib.js.concat(applicationConfiguration.assets.js, applicationConfiguration.assets.tests),

// Test results reporter to use
// Possible values: 'dots', 'progress', 'junit', 'growl', 'coverage'
Expand Down
10 changes: 5 additions & 5 deletions public/modules/core/services/menus.client.service.js
Expand Up @@ -20,7 +20,7 @@ angular.module('core').service('Menus', [
}
}
} else {
return !this.requiresAuthentication;
return this.isPublic;
}

return false;
Expand Down Expand Up @@ -51,10 +51,10 @@ angular.module('core').service('Menus', [
};

// Add new menu object by menu id
this.addMenu = function(menuId, requiresAuthentication, roles) {
this.addMenu = function(menuId, isPublic, roles) {
// Create the new menu
this.menus[menuId] = {
requiresAuthentication: requiresAuthentication || true,
isPublic: isPublic || false,
roles: roles || this.defaultRoles,
items: [],
shouldRender: shouldRender
Expand All @@ -74,7 +74,7 @@ angular.module('core').service('Menus', [
};

// Add menu item object
this.addMenuItem = function(menuId, menuItemTitle, menuItemURL, menuItemUIRoute, requiresAuthentication, roles) {
this.addMenuItem = function(menuId, menuItemTitle, menuItemURL, menuItemUIRoute, isPublic, roles) {
// Validate that the menu exists
this.validateMenuExistance(menuId);

Expand All @@ -83,7 +83,7 @@ angular.module('core').service('Menus', [
title: menuItemTitle,
link: menuItemURL,
uiRoute: menuItemUIRoute || ('/' + menuItemURL),
requiresAuthentication: requiresAuthentication || false,
isPublic: isPublic || this.menus[menuId].isPublic,
roles: roles || this.defaultRoles,
shouldRender: shouldRender
});
Expand Down

0 comments on commit 7c0078c

Please sign in to comment.