mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
OpenSearch Impl
- addition of icons (for search engine, feed and feed entries) - configurable items per page - addition of feed entry relevance (score) (ATOM only) - addition for generator & author feed elements (ATOM only) - guest url argument support - logging (log4j.logger.org.alfresco.web.api=DEBUG) - addition of abstract web api plug-in (for building new url web services) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4668 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -19,6 +19,8 @@ package org.alfresco.web.api;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
|
||||
|
||||
/**
|
||||
* API Service Request
|
||||
@@ -47,13 +49,12 @@ public class APIRequest extends HttpServletRequestWrapper
|
||||
User
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
* @param req
|
||||
*/
|
||||
public APIRequest(HttpServletRequest req)
|
||||
/*package*/ APIRequest(HttpServletRequest req)
|
||||
{
|
||||
super(req);
|
||||
}
|
||||
@@ -89,4 +90,24 @@ public class APIRequest extends HttpServletRequestWrapper
|
||||
return getPath() + getServletPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the currently authenticated username
|
||||
*
|
||||
* @return username
|
||||
*/
|
||||
public String getAuthenticatedUsername()
|
||||
{
|
||||
return AuthenticationUtil.getCurrentUserName();
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if Guest User?
|
||||
*
|
||||
* @return true => guest user
|
||||
*/
|
||||
public boolean isGuest()
|
||||
{
|
||||
return Boolean.valueOf(getParameter("guest"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user