diff --git a/source/java/org/alfresco/web/action/evaluator/RegenerateRenditionsEvaluator.java b/source/java/org/alfresco/web/action/evaluator/RegenerateRenditionsEvaluator.java index 7b2e6551d0..0282911305 100644 --- a/source/java/org/alfresco/web/action/evaluator/RegenerateRenditionsEvaluator.java +++ b/source/java/org/alfresco/web/action/evaluator/RegenerateRenditionsEvaluator.java @@ -1,19 +1,19 @@ /* - * 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 + * 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 . */ package org.alfresco.web.action.evaluator; @@ -65,6 +65,12 @@ public class RegenerateRenditionsEvaluator extends BaseActionEvaluator 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