Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)

78608: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
      78477: Merged DEV to V4.2-BUG-FIX (4.2.4)
         76926 : MNT-11931 : Exception when opening Document Details with QuickShare disabled
            - Test that quick share webscripts returns 403 if quick share is disabled 
         76939 : MNT-11931 : Exception when opening Document Details with QuickShare disabled
            - Implement quick share enabled web script. Don't display quick share link if quick share is turned off 
         78462 : MNT-11931 : Exception when opening Document Details with QuickShare disabled
             - Use SingletonValueProcessorExtension to check if quick share is enabled 


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82619 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Erik Winlof
2014-09-03 12:44:38 +00:00
parent ece89ceea0
commit 296077ace3
6 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
/*
* Copyright (C) 2005-2014 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.repo.web.scripts.quickshare;
import java.util.HashMap;
import java.util.Map;
import org.springframework.extensions.webscripts.Cache;
import org.springframework.extensions.webscripts.Status;
import org.springframework.extensions.webscripts.WebScriptRequest;
/**
* QuickShare/PublicView
*
* GET web script to get property system.quickshare.enabled value
*
* @author sergey.shcherbovich
* @since 4.2
*/
public class QuickShareEnabledGet extends AbstractQuickShareContent
{
@Override
protected Map<String, Object> executeImpl(final WebScriptRequest req, Status status, Cache cache)
{
Map<String, Object> model = new HashMap<String, Object>();
model.put("enabled", isEnabled());
return model;
}
}