Centralize the call to <code>setUser(true)</code> that must be done *before* the...
authorBruno Sinou <bsinou@argeo.org>
Thu, 29 Jan 2015 15:41:19 +0000 (15:41 +0000)
committerBruno Sinou <bsinou@argeo.org>
Thu, 29 Jan 2015 15:41:19 +0000 (15:41 +0000)
It is required for the progress window to appear

git-svn-id: https://svn.argeo.org/commons/trunk@7730 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.security.ui/src/org/argeo/security/ui/PrivilegedJob.java

index f66ef2b6011f7ad70b25f2030bbcaf39d07ae462..33ee4a6c9be86afcefcc15fd661e5e519249ddde 100644 (file)
@@ -24,6 +24,10 @@ public abstract class PrivilegedJob extends Job {
                super(jobName);
                authentication = SecurityContextHolder.getContext().getAuthentication();
                subject = Subject.getSubject(AccessController.getContext());
+
+               // Must be called *before* the job is scheduled,
+               // it is required for the progress window to appear
+               setUser(true);
        }
 
        @Override