//
// Create access policies for each access request in the widget model
//
for(IAccessEntity accessEntity:model.getAccessList()){
Policy policy = new Policy();
policy.setOrigin(accessEntity.getOrigin());
policy.setScope(widget.getGuid());
policy.setDirective("DENY");
if (grantAccessRequests){
policy.setDirective("ALLOW");
_logger.info("access policy granted for "+widget.getWidgetTitle("en")+" to access "+policy.getOrigin());
}
Policies.getInstance().addPolicy(policy);
}
} catch (ConfigurationException e) {
_logger.error("problem with policies configuration", e);