mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -25,6 +25,8 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.alfresco.query.PagingRequest;
|
||||
import org.alfresco.query.PagingResults;
|
||||
import org.alfresco.repo.calendar.CalendarServiceImpl;
|
||||
@@ -63,6 +65,13 @@ public class UserCalendarEntriesGet extends AbstractCalendarListingWebScript
|
||||
if (siteName != null)
|
||||
{
|
||||
site = siteService.getSite(siteName);
|
||||
|
||||
// MNT-3053 fix, siteName was provided in request but it doesn't exists or user has no permissions to access it.
|
||||
if (site == null)
|
||||
{
|
||||
status.setCode(HttpServletResponse.SC_NOT_FOUND, "Site '" + siteName + "' does not exist or user has no permissions to access it.");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return executeImpl(site, null, req, null, status, cache);
|
||||
|
Reference in New Issue
Block a user