mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -1102,7 +1102,7 @@ public class SitesImpl implements Sites
|
|||||||
SiteInfo siteInfo = null;
|
SiteInfo siteInfo = null;
|
||||||
try
|
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)
|
catch (SiteServiceException sse)
|
||||||
{
|
{
|
||||||
|
@@ -150,6 +150,10 @@ public class SiteEntityResource implements EntityResourceAction.Read<Site>,
|
|||||||
{
|
{
|
||||||
throw new InvalidArgumentException("Site update does not support field: role");
|
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.
|
// Bind valid fields to a SiteUpdate instance.
|
||||||
final String title = site.getTitle();
|
final String title = site.getTitle();
|
||||||
|
@@ -706,6 +706,17 @@ public class TestSites extends EnterpriseTestApi
|
|||||||
null,
|
null,
|
||||||
"Expected 400 response when updating "+site.getSiteId(), 400);
|
"Expected 400 response when updating "+site.getSiteId(), 400);
|
||||||
|
|
||||||
|
sitesProxy.update(
|
||||||
|
"sites",
|
||||||
|
site.getSiteId(),
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"{\n" +
|
||||||
|
" \"preset\": \"sitePreset\"" +
|
||||||
|
"}",
|
||||||
|
null,
|
||||||
|
"Expected 400 response when updating "+site.getSiteId(), 400);
|
||||||
|
|
||||||
// Details should not have changed.
|
// Details should not have changed.
|
||||||
Site fresh = sitesProxy.getSite(site.getSiteId(), 200);
|
Site fresh = sitesProxy.getSite(site.getSiteId(), 200);
|
||||||
site.expected(fresh);
|
site.expected(fresh);
|
||||||
|
Reference in New Issue
Block a user