Permalink
Browse files

Merge branch 'story/OZP-502-data-guard'

  • Loading branch information...
2 parents da537a0 + 4e58ff5 commit 4a3deaaa9b608de58edb136bbe7045d2ce3ef969 @tinaColemanNextCentury tinaColemanNextCentury committed Mar 14, 2013
Showing with 48 additions and 31 deletions.
  1. +20 −20 grails-app/conf/Config.groovy
  2. +14 −10 web-app/js/kernel/kernel-client.js
  3. +14 −1 web-app/js/widget/Widget.js
@@ -136,7 +136,7 @@ uiperformance.bundles = [
files: [
'../js-lib/dojo-1.5.0-windowname-only/dojo/owfdojo.js.uncompressed',
- 'audit/Audit',
+ 'audit/Audit',
'util/pageload',
'util/version',
'util/util',
@@ -189,7 +189,7 @@ uiperformance.bundles = [
'../js-lib/shindig/rpc',
'../js-lib/shindig/pubsub',
'ux/menu/Item',
- 'audit/Audit',
+ 'audit/Audit',
'util/version',
'util/log',
'util/pageload',
@@ -529,7 +529,7 @@ uiperformance.bundles = [
'ux/MessageBoxPlus',
'ux/OWFVtypes',
'../js-lib/log4javascript/log4javascript',
- 'audit/Audit',
+ 'audit/Audit',
'util/version',
'util/util',
'util/widget_utils',
@@ -989,23 +989,23 @@ owf {
cssImports = []
}
- dataguard {
- // Option to restrict messages between widgets based on access levels.
- // If this option is set to false, all other dataguard options are ignored.
- restrictMessages = true
-
- // Option to audit all messages between widgets, not just failed messages.
- // restrictMessages must be set to true
- auditAllMessages = false
-
- // Option to allow widgets to send messages without specifying their access level.
- // restrictMessages must be set to true
- allowMessagesWithoutAccessLevel = true
-
- // The amount of time (in milliseconds) to cache a widget's access level.
- // restrictMessages must be set to true
- accessLevelCacheTimeout = 3600000
- }
+ dataguard {
+ // Option to restrict messages between widgets based on access levels.
+ // If this option is set to false, all other dataguard options are ignored.
+ restrictMessages = false
+
+ // Option to audit all messages between widgets, not just failed messages.
+ // restrictMessages must be set to true
+ auditAllMessages = false
+
+ // Option to allow widgets to send messages without specifying their access level.
+ // restrictMessages must be set to true
+ allowMessagesWithoutAccessLevel = true
+
+ // The amount of time (in milliseconds) to cache a widget's access level.
+ // restrictMessages must be set to true
+ accessLevelCacheTimeout = 3600000
+ }
}
// log4j configuration : see log4j.xml
@@ -218,16 +218,20 @@ Ozone.eventing.priv = Ozone.eventing.priv || {};
var id = getIdFromWindowName();
var srcWidgetIframeId = '{\"id\":\"' + id + '\"}';
- Ozone.util.hasAccess({
- widgetId: widgetId,
- accessLevel: accessLevel,
- senderId: OWF.getWidgetGuid(),
- callback: function(response) {
- if (response.hasAccess) {
- gadgets.rpc.call("..", 'GET_FUNCTIONS', processFunctionsFromContainer, widgetId, srcWidgetIframeId);
- }
- }
- });
+ // Ozone.util.hasAccess({
+ // widgetId: widgetId,
+ // accessLevel: accessLevel,
+ // senderId: OWF.getWidgetGuid(),
+ // callback: function(response) {
+ // if (response.hasAccess) {
+ // gadgets.rpc.call("..", 'GET_FUNCTIONS', processFunctionsFromContainer, widgetId, srcWidgetIframeId);
+ // }
+ // }
+ // });
+
+ gadgets.rpc.call("..", 'GET_FUNCTIONS', processFunctionsFromContainer, widgetId, srcWidgetIframeId);
+
+
return proxy;
}
@@ -307,7 +307,20 @@ OWF = window.OWF ? window.OWF : {};
// RPC/Directed Eventing API
function initRPC() {
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) {
if(typeof fn !== 'function') {
throw 'Error: fn must be a function';

0 comments on commit 4a3deaa

Please sign in to comment.