Exemplo n.º 1
0
 protected Boolean isStyleAuth(
     AuthorizationFacade facade, Id qualifier, Agent agent, String function) {
   Style style = getStyleManager().getLightWeightStyle(qualifier);
   if (style == null) {
     return Boolean.valueOf(facade.isAuthorized(function, qualifier));
   }
   // owner can do anything
   if (agent.equals(style.getOwner())) {
     return Boolean.valueOf(true);
   }
   Id siteId = getIdManager().getId(style.getSiteId());
   return Boolean.valueOf(facade.isAuthorized(function, siteId));
 }
Exemplo n.º 2
0
 protected String getStyleUrl(Style style) {
   Node styleNode = getMatrixManager().getNode(style.getStyleFile());
   return styleNode.getExternalUri();
 }