mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged V4.0-BUG-FIX to HEAD
35501: ALF-13773 Simplify the is-guest vs no-authentication-at-all check for User and Admin only WebScripts 35502: Fix accidental config change .... git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@35506 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -307,12 +307,8 @@ public class RepositoryContainer extends AbstractRuntimeContainer implements Ten
|
||||
// Check to see if they supplied HTTP Auth or Ticket as guest, on a script that needs more
|
||||
if (required == RequiredAuthentication.user || required == RequiredAuthentication.admin)
|
||||
{
|
||||
if (auth != null)
|
||||
{
|
||||
isGuest = authorityService.isGuestAuthority(AuthenticationUtil.getFullyAuthenticatedUser());
|
||||
}
|
||||
|
||||
if (auth == null || isGuest)
|
||||
String authenticatedUser = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
if (authenticatedUser == null || authorityService.isGuestAuthority(authenticatedUser))
|
||||
{
|
||||
throw new WebScriptException(HttpServletResponse.SC_UNAUTHORIZED, "Web Script " + desc.getId() + " requires user authentication; however, a guest has attempted access.");
|
||||
}
|
||||
|
Reference in New Issue
Block a user