Skip to content

Commit

Permalink
Merge branch 'story/OZP-502-data-guard'
Browse files Browse the repository at this point in the history
  • Loading branch information
tinaColemanNextCentury committed Mar 14, 2013
2 parents da537a0 + 4e58ff5 commit 4a3deaa
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 31 deletions.
40 changes: 20 additions & 20 deletions grails-app/conf/Config.groovy
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ uiperformance.bundles = [


files: [ files: [
'../js-lib/dojo-1.5.0-windowname-only/dojo/owfdojo.js.uncompressed', '../js-lib/dojo-1.5.0-windowname-only/dojo/owfdojo.js.uncompressed',
'audit/Audit', 'audit/Audit',
'util/pageload', 'util/pageload',
'util/version', 'util/version',
'util/util', 'util/util',
Expand Down Expand Up @@ -189,7 +189,7 @@ uiperformance.bundles = [
'../js-lib/shindig/rpc', '../js-lib/shindig/rpc',
'../js-lib/shindig/pubsub', '../js-lib/shindig/pubsub',
'ux/menu/Item', 'ux/menu/Item',
'audit/Audit', 'audit/Audit',
'util/version', 'util/version',
'util/log', 'util/log',
'util/pageload', 'util/pageload',
Expand Down Expand Up @@ -529,7 +529,7 @@ uiperformance.bundles = [
'ux/MessageBoxPlus', 'ux/MessageBoxPlus',
'ux/OWFVtypes', 'ux/OWFVtypes',
'../js-lib/log4javascript/log4javascript', '../js-lib/log4javascript/log4javascript',
'audit/Audit', 'audit/Audit',
'util/version', 'util/version',
'util/util', 'util/util',
'util/widget_utils', 'util/widget_utils',
Expand Down Expand Up @@ -989,23 +989,23 @@ owf {
cssImports = [] cssImports = []
} }


dataguard { dataguard {
// Option to restrict messages between widgets based on access levels. // Option to restrict messages between widgets based on access levels.
// If this option is set to false, all other dataguard options are ignored. // If this option is set to false, all other dataguard options are ignored.
restrictMessages = true restrictMessages = false


// Option to audit all messages between widgets, not just failed messages. // Option to audit all messages between widgets, not just failed messages.
// restrictMessages must be set to true // restrictMessages must be set to true
auditAllMessages = false auditAllMessages = false


// Option to allow widgets to send messages without specifying their access level. // Option to allow widgets to send messages without specifying their access level.
// restrictMessages must be set to true // restrictMessages must be set to true
allowMessagesWithoutAccessLevel = true allowMessagesWithoutAccessLevel = true


// The amount of time (in milliseconds) to cache a widget's access level. // The amount of time (in milliseconds) to cache a widget's access level.
// restrictMessages must be set to true // restrictMessages must be set to true
accessLevelCacheTimeout = 3600000 accessLevelCacheTimeout = 3600000
} }
} }


// log4j configuration : see log4j.xml // log4j configuration : see log4j.xml
Expand Down
24 changes: 14 additions & 10 deletions web-app/js/kernel/kernel-client.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -218,16 +218,20 @@ Ozone.eventing.priv = Ozone.eventing.priv || {};


var id = getIdFromWindowName(); var id = getIdFromWindowName();
var srcWidgetIframeId = '{\"id\":\"' + id + '\"}'; var srcWidgetIframeId = '{\"id\":\"' + id + '\"}';
Ozone.util.hasAccess({ // Ozone.util.hasAccess({
widgetId: widgetId, // widgetId: widgetId,
accessLevel: accessLevel, // accessLevel: accessLevel,
senderId: OWF.getWidgetGuid(), // senderId: OWF.getWidgetGuid(),
callback: function(response) { // callback: function(response) {
if (response.hasAccess) { // if (response.hasAccess) {
gadgets.rpc.call("..", 'GET_FUNCTIONS', processFunctionsFromContainer, widgetId, srcWidgetIframeId); // gadgets.rpc.call("..", 'GET_FUNCTIONS', processFunctionsFromContainer, widgetId, srcWidgetIframeId);
} // }
} // }
}); // });

gadgets.rpc.call("..", 'GET_FUNCTIONS', processFunctionsFromContainer, widgetId, srcWidgetIframeId);


return proxy; return proxy;
} }


Expand Down
15 changes: 14 additions & 1 deletion web-app/js/widget/Widget.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -307,7 +307,20 @@ OWF = window.OWF ? window.OWF : {};
// RPC/Directed Eventing API // RPC/Directed Eventing API
function initRPC() { function initRPC() {
OWF.RPC.registerFunctions = Ozone.eventing.registerFunctions; OWF.RPC.registerFunctions = Ozone.eventing.registerFunctions;
OWF.RPC.getWidgetProxy = Ozone.eventing.importWidget;
OWF.RPC.getWidgetProxy = function(widgetId, ready, accessLevel) {
Ozone.util.hasAccess( {
widgetId: widgetId,
accessLevel: accessLevel,
senderId: OWF.getWidgetGuid(),
callback: function(response) {
if (response.hasAccess)
return Ozone.eventing.importWidget(widgetId, ready)
}
});
}


OWF.RPC.handleDirectMessage = function(fn) { OWF.RPC.handleDirectMessage = function(fn) {
if(typeof fn !== 'function') { if(typeof fn !== 'function') {
throw 'Error: fn must be a function'; throw 'Error: fn must be a function';
Expand Down

0 comments on commit 4a3deaa

Please sign in to comment.