Skip to content

Commit

Permalink
Fixing security-related spring contexts.
Browse files Browse the repository at this point in the history
  • Loading branch information
semancik committed Mar 18, 2014
1 parent 2700c2d commit 0917e6f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
Expand Up @@ -58,7 +58,9 @@ http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<form-login login-page="/login" default-target-url="/home" />
</http>

<beans:bean id="accessDecisionManager" class="com.evolveum.midpoint.web.security.MidPointGuiAuthorizationEvaluator"/>
<beans:bean id="accessDecisionManager" class="com.evolveum.midpoint.web.security.MidPointGuiAuthorizationEvaluator">
<beans:constructor-arg name="securityEnforcer" ref="securityEnforcer"/>
</beans:bean>

<beans:bean id="logoutHandler" class="com.evolveum.midpoint.web.security.AuditedLogoutHandler" />

Expand Down
6 changes: 3 additions & 3 deletions gui/admin-gui/src/main/webapp/WEB-INF/web.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2013 Evolveum
~ Copyright (c) 2010-2014 Evolveum
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">

<display-name>idm</display-name>
<display-name>midPoint</display-name>

<context-param>
<param-name>contextConfigLocation</param-name>
Expand All @@ -38,7 +38,7 @@
classpath*:ctx-notifications.xml,
classpath:ctx-camel-imports.xml,
/WEB-INF/ctx-webapp.xml,
/WEB-INF/ctx-security.xml,
/WEB-INF/ctx-web-security.xml,
/WEB-INF/ctx-init.xml
</param-value>
</context-param>
Expand Down
Expand Up @@ -53,7 +53,7 @@
"classpath:ctx-model.xml",
"classpath*:ctx-workflow.xml",
"file:src/main/webapp/WEB-INF/ctx-init.xml",
"file:src/main/webapp/WEB-INF/ctx-security.xml",
"file:src/main/webapp/WEB-INF/ctx-web-security.xml",
"file:src/main/webapp/WEB-INF/ctx-webapp.xml"})
@DirtiesContext(classMode = ClassMode.AFTER_CLASS)
public class TestCleanStartup extends AbstractModelIntegrationTest {
Expand Down
2 changes: 1 addition & 1 deletion model/model-impl/src/main/resources/ctx-model.xml
Expand Up @@ -413,7 +413,7 @@

<bean id="springAuthenticationInjector" class="com.evolveum.midpoint.model.security.SpringAuthenticationInjectorInterceptor">
<constructor-arg name="userDetailsService" ref="userDetailsService"/>
<constructor-arg name="securityEnforcer" ref="securityEnforcerImpl"/>
<constructor-arg name="securityEnforcer" ref="securityEnforcer"/>
<constructor-arg name="auditService" ref="auditService"/>
<constructor-arg name="taskManager" ref="taskManager"/>
</bean>
Expand Down
Expand Up @@ -59,7 +59,7 @@
* @author Radovan Semancik
*
*/
@Component
@Component("securityEnforcer")
public class SecurityEnforcerImpl implements SecurityEnforcer {

private static final Trace LOGGER = TraceManager.getTrace(SecurityEnforcerImpl.class);
Expand Down
Expand Up @@ -75,6 +75,7 @@
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Service;

Expand Down Expand Up @@ -163,6 +164,7 @@ public class TaskManagerQuartzImpl implements TaskManager, BeanFactoryAware {
private LightweightIdentifierGenerator lightweightIdentifierGenerator;

@Autowired(required=true)
@Qualifier("securityEnforcer")
private SecurityEnforcer securityEnforcer;

@Autowired(required=true)
Expand Down

0 comments on commit 0917e6f

Please sign in to comment.