Fix public api tests

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@49008 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Steven Glover
2013-04-09 15:38:37 +00:00
parent 0bc61d6d35
commit e23383e064
2 changed files with 4 additions and 82 deletions

View File

@@ -39,6 +39,7 @@ import org.alfresco.repo.content.MimetypeMap;
import org.alfresco.repo.security.authentication.AuthenticationContext;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.service.cmr.preference.PreferenceService;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentService;
@@ -205,7 +206,7 @@ public class PreferenceServiceImpl implements PreferenceService
{
// The current user does not have sufficient permissions to get
// the preferences for this user
throw new UnauthorizedAccessException("The current user " + currentUserName
throw new AccessDeniedException("The current user " + currentUserName
+ " does not have sufficient permissions to get the preferences of the user " + userName);
}
@@ -391,7 +392,7 @@ public class PreferenceServiceImpl implements PreferenceService
{
// The current user does not have sufficient permissions to update
// the preferences for this user
throw new UnauthorizedAccessException("The current user " + AuthenticationUtil.getFullyAuthenticatedUser()
throw new AccessDeniedException("The current user " + AuthenticationUtil.getFullyAuthenticatedUser()
+ " does not have sufficient permissions to update the preferences of the user " + userName);
}
}
@@ -481,7 +482,7 @@ public class PreferenceServiceImpl implements PreferenceService
{
// The current user does not have sufficient permissions to update
// the preferences for this user
throw new UnauthorizedAccessException("The current user " + AuthenticationUtil.getFullyAuthenticatedUser()
throw new AccessDeniedException("The current user " + AuthenticationUtil.getFullyAuthenticatedUser()
+ " does not have sufficient permissions to update the preferences of the user " + userName);
}
}