Merged 5.0.N (5.0.3) to HEAD (5.1/Cloud) (PARTIAL MERGE)

109176: MNT-3053 : User can see page with information about all events (they are entitled to see) on all sites, if they use an incorrect url.
      - UserCalendarEntriesGet.java now returns 404 status code of requested site doesn't exist.
      - Unit test added.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@109197 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tatyana Valkevych
2015-07-30 09:49:52 +00:00
parent 930dff0dc3
commit ac0c8cc13f
2 changed files with 24 additions and 0 deletions

View File

@@ -39,6 +39,7 @@ import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.cmr.site.SiteInfo;
import org.alfresco.service.cmr.site.SiteService;
import org.alfresco.service.cmr.site.SiteVisibility;
import org.alfresco.util.GUID;
import org.alfresco.util.PropertyMap;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -1182,6 +1183,20 @@ public class CalendarRestApiTest extends BaseWebScriptTest
events = result.getJSONArray("events");
assertEquals(0, events.length());
}
/**
* Listing for a user
*/
public void testMNT_3053() throws Exception
{
String siteName = null;
do
{
siteName = GUID.generate();
}
while (siteService.getSite(siteName) != null);
sendRequest(new GetRequest("/calendar/events/" + siteName + "/user"), 404);
}
/**
* Repeating events support, across both the site