AnsweredAssumed Answered

I get AccessDeniedException despite using RunAsWork

Question asked by buddycasino on Sep 2, 2009
This gives me a " Access Denied. You do not have the appropriate permissions to perform this operation.":

Set<String> authorities = AuthenticationUtil.runAs(new RunAsWork<Set<String>>() {

   public Set<String> doWork() throws Exception {
      return services.getAuthorityService().getAuthoritiesForUser(userName);
}, AuthenticationUtil.getSystemUserName());

The system user should have the necessary rights!
I'm using Alfresco 2.2.2, btw.

Any ideas, anyone?