Centralize the call to <code>setUser(true)</code> that must be done *before* the...
[lgpl/argeo-commons.git] / 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