public boolean canRenameNode(BrixNode node, Context context) {
   if (!isNodeEditable(node)) {
     return false;
   }
   Action action = new SiteNodeAction(context, Type.NODE_DELETE, node);
   return brix.getAuthorizationStrategy().isActionAuthorized(action);
 }
 public boolean canAddNodeChild(BrixNode node, Context context) {
   if (!isNodeEditable(node)) {
     return false;
   }
   Action action = new SiteNodeAction(context, Type.NODE_ADD_CHILD, node);
   return brix.getAuthorizationStrategy().isActionAuthorized(action);
 }
Пример #3
0
 @Override
 public boolean isVisible() {
   final Brix brix = Brix.get();
   final Workspace workspace = getWorkspaceModel().getObject();
   final Action action = new AccessWebDavUrlPluginAction(workspace);
   final boolean granted = brix.getAuthorizationStrategy().isActionAuthorized(action);
   return granted;
 }
 public boolean canViewNodeChildren(BrixNode node, Context context) {
   Action action = new SiteNodeAction(context, Type.NODE_VIEW_CHILDREN, node);
   return brix.getAuthorizationStrategy().isActionAuthorized(action);
 }