mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
78438: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 77695: ACE-2149 - EOL AVM / WCM. Ripped WCM out of Explorer. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82564 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,59 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Create Form in the Forms DataDictionary folder
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class CreateFormEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
private static final long serialVersionUID = 4475319627518524432L;
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
final FacesContext fc = FacesContext.getCurrentInstance();
|
||||
final ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
final NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
|
||||
// get the path to the current name - compare last element with the Forms folder name
|
||||
final Path path = navigator.getCurrentNode().getNodePath();
|
||||
final Path.Element element = path.get(path.size() - 1);
|
||||
final String endPath = element.getPrefixedString(services.getNamespaceService());
|
||||
|
||||
// check we have the permission to create nodes in that Forma folder
|
||||
return (Application.getContentFormsFolderName(fc).equals(endPath) &&
|
||||
navigator.getCurrentNode().hasPermission(PermissionService.ADD_CHILDREN));
|
||||
}
|
||||
}
|
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Create Project Collaboration Space in the Projects folder
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class CreateProjectEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
|
||||
// get the path to the current name - compare last element with the Website folder assoc name
|
||||
Path path = navigator.getCurrentNode().getNodePath();
|
||||
Path.Element element = path.get(path.size() - 1);
|
||||
String endPath = element.getPrefixedString(services.getNamespaceService());
|
||||
|
||||
if (Application.getProjectsFolderName(fc).equals(endPath))
|
||||
{
|
||||
// check we have the permission to create nodes in the Projects folder
|
||||
return navigator.getCurrentNode().hasPermission(PermissionService.ADD_CHILDREN);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Create Web Forms in the Web Forms DataDictionary folder
|
||||
*
|
||||
*/
|
||||
public class CreateWebFormEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
final FacesContext fc = FacesContext.getCurrentInstance();
|
||||
final ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
final NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
|
||||
// get the path to the current name - compare last element with the Web Forms folder name
|
||||
final Path path = navigator.getCurrentNode().getNodePath();
|
||||
final Path.Element element = path.get(path.size() - 1);
|
||||
final String endPath = element.getPrefixedString(services.getNamespaceService());
|
||||
|
||||
// check we have the permission to create nodes in that Web Forms folder
|
||||
return (Application.getWebContentFormsFolderName(fc).equals(endPath) &&
|
||||
navigator.getCurrentNode().hasPermission(PermissionService.ADD_CHILDREN));
|
||||
}
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.web.app.Application;
|
||||
import org.alfresco.web.app.servlet.FacesHelper;
|
||||
import org.alfresco.web.bean.NavigationBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
import org.alfresco.web.bean.repository.Repository;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Create Web Project in the Websites folder
|
||||
*
|
||||
* @author Kevin Roast
|
||||
*/
|
||||
public class CreateWebProjectEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
private static final long serialVersionUID = 9061864145360361349L;
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(Node node)
|
||||
{
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
|
||||
// get the path to the current name - compare last element with the Website folder assoc name
|
||||
Path path = navigator.getCurrentNode().getNodePath();
|
||||
Path.Element element = path.get(path.size() - 1);
|
||||
String endPath = element.getPrefixedString(services.getNamespaceService());
|
||||
|
||||
if (Application.getWebsitesFolderName(fc).equals(endPath))
|
||||
{
|
||||
// check we have the permission to create nodes in that Website folder
|
||||
return navigator.getCurrentNode().hasPermission(PermissionService.ADD_CHILDREN);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. */
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Edit Form in the Forms DataDictionary folder
|
||||
*
|
||||
* @author Ariel Backenroth
|
||||
*/
|
||||
public class EditFormEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
private static final long serialVersionUID = -509493291648778510L;
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(final Node node)
|
||||
{
|
||||
// // WCM
|
||||
// final FacesContext fc = FacesContext.getCurrentInstance();
|
||||
// final ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
// final NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
//
|
||||
// // get the path to the current name - compare last element with the Forms folder name
|
||||
// final Path path = navigator.getCurrentNode().getNodePath();
|
||||
// final Path.Element element = path.get(path.size() - 1);
|
||||
// final String endPath = element.getPrefixedString(services.getNamespaceService());
|
||||
//
|
||||
// return (Application.getContentFormsFolderName(fc).equals(endPath) &&
|
||||
// node.hasAspect(WCMAppModel.ASPECT_FORM));
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>. */
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Edit Web Form in the Web Forms DataDictionary folder
|
||||
*
|
||||
* @author Ariel Backenroth
|
||||
*/
|
||||
public class EditWebFormEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(final Node node)
|
||||
{
|
||||
// // WCM
|
||||
// final FacesContext fc = FacesContext.getCurrentInstance();
|
||||
// final ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
// final NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
//
|
||||
// // get the path to the current name - compare last element with the Web Forms folder name
|
||||
// final Path path = navigator.getCurrentNode().getNodePath();
|
||||
// final Path.Element element = path.get(path.size() - 1);
|
||||
// final String endPath = element.getPrefixedString(services.getNamespaceService());
|
||||
//
|
||||
// return (Application.getWebContentFormsFolderName(fc).equals(endPath) &&
|
||||
// node.hasAspect(WCMAppModel.ASPECT_FORM));
|
||||
return false;
|
||||
}
|
||||
}
|
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Evaluates whether the change and remove permissions action should be visible.
|
||||
*
|
||||
* @author Sergey Gavrusev
|
||||
*/
|
||||
public class ManagePermissionIsMainStoreEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 4221869509273412546L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.web.action.evaluator.BaseActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(final Node node)
|
||||
{
|
||||
boolean result = false;
|
||||
// // WCM
|
||||
// final String path = AVMNodeConverter.ToAVMVersionPath(node.getNodeRef()).getSecond();
|
||||
// if (!AVMUtil.isMainStore(AVMUtil.getStoreName(path)))
|
||||
// {
|
||||
// result = true;
|
||||
// }
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.web.action.evaluator.BaseActionEvaluator#evaluate(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean evaluate(final Object obj)
|
||||
{
|
||||
// // WCM
|
||||
// if (obj instanceof ManagePermissionsDialog)
|
||||
// {
|
||||
// return ((ManagePermissionsDialog) obj).isRendered();
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
@@ -1,91 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator for Regenerate Renditions in the Web Forms DataDictionary folder
|
||||
*
|
||||
* @author Ariel Backenroth
|
||||
*/
|
||||
public class RegenerateRenditionsEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
private static final long serialVersionUID = -3479861093052578775L;
|
||||
|
||||
/**
|
||||
* @see org.alfresco.web.action.ActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
public boolean evaluate(final Node node)
|
||||
{
|
||||
// Sparta: disable/remove WCM/AVM
|
||||
return false;
|
||||
|
||||
/*
|
||||
// is the authenticated user permitted to execute the regenerate renditions action
|
||||
// against at least one web project
|
||||
boolean isUserAllowed = false;
|
||||
|
||||
final FacesContext fc = FacesContext.getCurrentInstance();
|
||||
final ServiceRegistry services = Repository.getServiceRegistry(fc);
|
||||
final PermissionService permissionService = services.getPermissionService();
|
||||
final WebProjectService webProjectService = services.getWebProjectService();
|
||||
final NavigationBean navigator = (NavigationBean)FacesHelper.getManagedBean(fc, NavigationBean.BEAN_NAME);
|
||||
|
||||
// before looking for web projects ensure the root folder is present i.e. WCM is enabled!
|
||||
if (!webProjectService.hasWebProjectsRoot())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// check that the authenticated user has CONTENT MANAGER permissions for at least one web project
|
||||
// this will ensure that the action appears only if the user is able to regenerate renditions
|
||||
// for at least one web project
|
||||
List<WebProjectInfo> wpInfos = webProjectService.listWebProjects();
|
||||
for (WebProjectInfo wpInfo : wpInfos)
|
||||
{
|
||||
if(permissionService.hasPermission(wpInfo.getNodeRef(), PermissionService.WCM_CONTENT_MANAGER) == AccessStatus.ALLOWED)
|
||||
{
|
||||
isUserAllowed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO improve how we determine whether the form supports the ability to regenerate renditions or not
|
||||
|
||||
// get the path to the current name - compare each path element with the Web Forms folder name
|
||||
final Path path = navigator.getCurrentNode().getNodePath();
|
||||
|
||||
boolean isWebFormsPath = false;
|
||||
Iterator<Path.Element> itr = path.iterator();
|
||||
while (itr.hasNext())
|
||||
{
|
||||
Path.Element element = (Path.Element)itr.next();
|
||||
String pathElement = element.getPrefixedString(services.getNamespaceService());
|
||||
if (Application.getWebContentFormsFolderName(fc).equals(pathElement))
|
||||
{
|
||||
isWebFormsPath = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return (node.hasAspect(WCMAppModel.ASPECT_RENDERING_ENGINE_TEMPLATE) || isWebFormsPath) && isUserAllowed;
|
||||
*/
|
||||
}
|
||||
}
|
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
* Alfresco is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Alfresco is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.alfresco.web.action.evaluator;
|
||||
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
|
||||
/**
|
||||
* UI Action Evaluator - Evaluates whether the view permissions action should be visible.
|
||||
*
|
||||
* @author Sergey Gavrusev
|
||||
*/
|
||||
public class ViewPermissionEvaluator extends BaseActionEvaluator
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1340473144312214960L;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.web.action.evaluator.BaseActionEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
|
||||
*/
|
||||
@Override
|
||||
public boolean evaluate(final Node node)
|
||||
{
|
||||
boolean result = true;
|
||||
// // WCM
|
||||
// final String path = AVMNodeConverter.ToAVMVersionPath(node.getNodeRef()).getSecond();
|
||||
// if (!AVMUtil.isMainStore(AVMUtil.getStoreName(path)))
|
||||
// {
|
||||
// result = false;
|
||||
// }
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.alfresco.web.action.evaluator.BaseActionEvaluator#evaluate(java.lang.Object)
|
||||
*/
|
||||
@Override
|
||||
public boolean evaluate(Object obj)
|
||||
{
|
||||
// // WCM
|
||||
// if (obj instanceof ManagePermissionsDialog)
|
||||
// {
|
||||
// return !((ManagePermissionsDialog) obj).isRendered();
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user