REPO-1523: REGRESS: Site created from API cannot be accessed via Share

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@132249 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Raluca Munteanu
2016-11-03 13:49:34 +00:00
parent 1d20c23a67
commit 8e553ec442
3 changed files with 16 additions and 1 deletions

View File

@@ -1102,7 +1102,7 @@ public class SitesImpl implements Sites
SiteInfo siteInfo = null;
try
{
siteInfo = siteService.createSite(site.getPreset(), site.getId(), site.getTitle(), site.getDescription(), site.getVisibility());
siteInfo = siteService.createSite(site.getPreset() != null ? site.getPreset() : "sitePreset", site.getId(), site.getTitle(), site.getDescription(), site.getVisibility());
}
catch (SiteServiceException sse)
{

View File

@@ -150,6 +150,10 @@ public class SiteEntityResource implements EntityResourceAction.Read<Site>,
{
throw new InvalidArgumentException("Site update does not support field: role");
}
if (site.getPreset() != null)
{
throw new InvalidArgumentException("Site update does not support field: preset");
}
// Bind valid fields to a SiteUpdate instance.
final String title = site.getTitle();