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

76608: Reverse merged HEAD-BUG-FIX (5.0/Cloud)
      << Commits from broken build on V4.2-BUG-FIX >>
      76591: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
         76521: Merged DEV to V4.2-BUG-FIX
          76328 : MNT-11854 : Consumer allowed to create Discussion, Wiki, Blog and Link if she/he creates the first item
           Add the changes - for discussion, blog and link containers we will get site permission. 
      76592: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
         76523: Merged DEV to V4.2-BUG-FIX
          58015 : MNT-5877 : Unable to move a working copy
           Add actions to move/copy/delete working copies.
      76593: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud)
         76534: MNT-10226: Merged DEV to V4.2-BUG-FIX (4.2.4)
            76512: MNT-10226: Web Script - Status 500 error on 'Edit Properties' page after adding 'Restrictable' aspect through CMIS 1.1 API
               - Convert default value in appliance with type of the property.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@77665 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2014-07-22 16:06:29 +00:00
parent 06a2d4a2aa
commit 29973b9124
3 changed files with 23 additions and 6 deletions

View File

@@ -243,10 +243,10 @@ public abstract class AbstractBlogWebScript extends DeclarativeWebScript
}
else
{
// MNT-11854 Consumer allowed to create Discussion, Wiki, Blog and Link if she/he creates the first item
// The NodeRef is the container (if it exists)
if (siteService.hasContainer(siteName, BlogServiceImpl.BLOG_COMPONENT))
{
nodeRef = site.getNodeRef();
nodeRef = siteService.getContainer(siteName, BlogServiceImpl.BLOG_COMPONENT);
}
}
}

View File

@@ -533,10 +533,10 @@ public abstract class AbstractDiscussionWebScript extends DeclarativeWebScript
}
else
{
// MNT-11854 Consumer allowed to create Discussion, Wiki, Blog and Link if she/he creates the first item
// The NodeRef is the container (if it exists)
if (siteService.hasContainer(siteName, DiscussionServiceImpl.DISCUSSION_COMPONENT))
{
nodeRef = site.getNodeRef();
nodeRef = siteService.getContainer(siteName, DiscussionServiceImpl.DISCUSSION_COMPONENT);
}
}
}

View File

@@ -140,8 +140,25 @@ public class LinksListGet extends AbstractLinksWebScript
}
// We need the container node for permissions checking
// MNT-11854 Consumer allowed to create Discussion, Wiki, Blog and Link if she/he creates the first item
NodeRef container = site.getNodeRef();
NodeRef container;
if (links.getPage().size() > 0)
{
container = links.getPage().get(0).getContainerNodeRef();
}
else
{
// Find the container (if it's been created yet)
container = siteService.getContainer(
site.getShortName(), LinksServiceImpl.LINKS_COMPONENT);
if (container == null)
{
// Brand new site, no write operations on links have happened
// Fudge it for now with the site itself, the first write call
// will have the container created
container = site.getNodeRef();
}
}
// All done
Map<String, Object> model = new HashMap<String, Object>();