|
42 | 42 | import org.apache.syncope.core.provisioning.api.job.JobExecutionContext; |
43 | 43 | import org.apache.syncope.core.provisioning.api.job.JobExecutionException; |
44 | 44 | import org.apache.syncope.core.provisioning.api.job.StoppableJobDelegate; |
| 45 | +import org.apache.syncope.core.spring.security.AuthContextUtils; |
45 | 46 | import org.springframework.beans.factory.annotation.Autowired; |
46 | 47 | import org.springframework.data.domain.PageRequest; |
47 | 48 | import org.springframework.data.domain.Sort; |
@@ -89,8 +90,8 @@ public void execute( |
89 | 90 | final JobExecutionContext context) |
90 | 91 | throws JobExecutionException { |
91 | 92 |
|
92 | | - groupKey = (String) context.getData().get(GROUP_KEY_JOBDETAIL_KEY); |
93 | | - action = (ProvisionAction) context.getData().get(ACTION_JOBDETAIL_KEY); |
| 93 | + groupKey = (String) context.data().get(GROUP_KEY_JOBDETAIL_KEY); |
| 94 | + action = (ProvisionAction) context.data().get(ACTION_JOBDETAIL_KEY); |
94 | 95 |
|
95 | 96 | super.execute(taskType, taskKey, context); |
96 | 97 | } |
@@ -143,9 +144,9 @@ protected String doExecute(final JobExecutionContext context) { |
143 | 144 |
|
144 | 145 | List<PropagationStatus> statuses = action == ProvisionAction.DEPROVISION |
145 | 146 | ? userProvisioningManager.deprovision( |
146 | | - user.getKey(), gResources, false, executor) |
| 147 | + user.getKey(), gResources, false, AuthContextUtils.getUsername()) |
147 | 148 | : userProvisioningManager.provision( |
148 | | - user.getKey(), true, null, gResources, false, executor); |
| 149 | + user.getKey(), true, null, gResources, false, AuthContextUtils.getUsername()); |
149 | 150 | for (PropagationStatus propagationStatus : statuses) { |
150 | 151 | result.append("User ").append(user.getKey()).append('\t'). |
151 | 152 | append("Resource ").append(propagationStatus.getResource()).append('\t'). |
@@ -192,9 +193,9 @@ protected String doExecute(final JobExecutionContext context) { |
192 | 193 |
|
193 | 194 | List<PropagationStatus> statuses = action == ProvisionAction.DEPROVISION |
194 | 195 | ? anyObjectProvisioningManager.deprovision( |
195 | | - anyObject.getKey(), gResources, false, executor) |
| 196 | + anyObject.getKey(), gResources, false, AuthContextUtils.getUsername()) |
196 | 197 | : anyObjectProvisioningManager.provision( |
197 | | - anyObject.getKey(), gResources, false, executor); |
| 198 | + anyObject.getKey(), gResources, false, AuthContextUtils.getUsername()); |
198 | 199 |
|
199 | 200 | for (PropagationStatus propagationStatus : statuses) { |
200 | 201 | result.append(anyObject.getType().getKey()).append(' '). |
|
0 commit comments