File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
multiapps-controller-core/src/main/java/org/cloudfoundry/multiapps/controller/core/auditlogging
multiapps-controller-web/src/main/java/org/cloudfoundry/multiapps/controller/web/bootstrap Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change 11package org .cloudfoundry .multiapps .controller .core .auditlogging ;
22
3+ import org .cloudfoundry .multiapps .controller .core .auditlogging .impl .AuditLoggingFacadeSLImpl ;
34import org .springframework .context .annotation .Bean ;
45import org .springframework .context .annotation .Configuration ;
56
67import javax .inject .Inject ;
8+ import javax .sql .DataSource ;
79
810@ Configuration
911public class AuditLogBean {
1012
11- // @Bean
12- // public AuditLoggingFacade buildAuditLoggingFacade() throws NamingException {
13- // AuditLogMessageFactory auditLogMessageFactory = (AuditLogMessageFactory) new InitialContext().lookup("java:comp/env/audit");
14- // return new AuditLoggingFacadeXSAImpl(auditLogMessageFactory);
15- // }
13+ @ Bean
14+ public AuditLoggingFacade buildAuditLoggingFacade (DataSource dataSource , UserInfoProvider userInfoProvider ) {
15+ return new AuditLoggingFacadeSLImpl (dataSource , userInfoProvider );
16+ }
1617
1718 @ Bean
1819 @ Inject
Original file line number Diff line number Diff line change 1212import javax .servlet .http .HttpServlet ;
1313import javax .sql .DataSource ;
1414
15+ import org .cloudfoundry .multiapps .controller .core .auditlogging .UserInfoProvider ;
1516import org .cloudfoundry .multiapps .controller .core .util .ApplicationConfiguration ;
1617import org .cloudfoundry .multiapps .controller .persistence .services .FileService ;
1718import org .cloudfoundry .multiapps .controller .persistence .services .LockOwnerService ;
1819import org .cloudfoundry .multiapps .controller .process .util .LockOwnerReleaser ;
1920import org .cloudfoundry .multiapps .controller .web .Messages ;
21+ import org .cloudfoundry .multiapps .controller .web .util .SecurityContextUtil ;
2022import org .flowable .engine .ProcessEngine ;
2123import org .slf4j .Logger ;
2224import org .slf4j .LoggerFactory ;
2325import org .springframework .beans .factory .annotation .Qualifier ;
26+ import org .springframework .context .annotation .Bean ;
2427import org .springframework .web .context .support .SpringBeanAutowiringSupport ;
2528
2629public class BootstrapServlet extends HttpServlet {
@@ -114,4 +117,9 @@ private void clearLockOwner() {
114117 protected void destroyExtras () {
115118 // Do nothing
116119 }
120+
121+ @ Bean
122+ public UserInfoProvider buildUserInfoProvider () {
123+ return SecurityContextUtil ::getUserInfo ;
124+ }
117125}
You can’t perform that action at this time.
0 commit comments