Commit 85338f8e by Jason Song

fix filter precedence bug and js bug

parent 96fd956e
...@@ -5,6 +5,7 @@ import javax.servlet.DispatcherType; ...@@ -5,6 +5,7 @@ import javax.servlet.DispatcherType;
import org.springframework.boot.context.embedded.FilterRegistrationBean; import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import com.dianping.cat.servlet.CatFilter; import com.dianping.cat.servlet.CatFilter;
...@@ -18,6 +19,7 @@ public class CatConfig { ...@@ -18,6 +19,7 @@ public class CatConfig {
bean.setName("cat-filter"); bean.setName("cat-filter");
bean.addUrlPatterns("/*"); bean.addUrlPatterns("/*");
bean.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.FORWARD); bean.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.FORWARD);
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return bean; return bean;
} }
......
...@@ -65,6 +65,7 @@ public class AuthConfiguration { ...@@ -65,6 +65,7 @@ public class AuthConfiguration {
FilterRegistrationBean singleSignOutFilter = new FilterRegistrationBean(); FilterRegistrationBean singleSignOutFilter = new FilterRegistrationBean();
singleSignOutFilter.setFilter(filter("org.jasig.cas.client.session.SingleSignOutFilter")); singleSignOutFilter.setFilter(filter("org.jasig.cas.client.session.SingleSignOutFilter"));
singleSignOutFilter.addUrlPatterns("/*"); singleSignOutFilter.addUrlPatterns("/*");
singleSignOutFilter.setOrder(1);
return singleSignOutFilter; return singleSignOutFilter;
} }
...@@ -83,6 +84,7 @@ public class AuthConfiguration { ...@@ -83,6 +84,7 @@ public class AuthConfiguration {
casFilter.setInitParameters(filterInitParam); casFilter.setInitParameters(filterInitParam);
casFilter.setFilter(filter("com.ctrip.framework.apollo.sso.filter.ApolloAuthenticationFilter")); casFilter.setFilter(filter("com.ctrip.framework.apollo.sso.filter.ApolloAuthenticationFilter"));
casFilter.addUrlPatterns("/*"); casFilter.addUrlPatterns("/*");
casFilter.setOrder(2);
return casFilter; return casFilter;
} }
...@@ -102,6 +104,7 @@ public class AuthConfiguration { ...@@ -102,6 +104,7 @@ public class AuthConfiguration {
casValidationFilter.setFilter(filter("org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter")); casValidationFilter.setFilter(filter("org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter"));
casValidationFilter.setInitParameters(filterInitParam); casValidationFilter.setInitParameters(filterInitParam);
casValidationFilter.addUrlPatterns("/*"); casValidationFilter.addUrlPatterns("/*");
casValidationFilter.setOrder(3);
return casValidationFilter; return casValidationFilter;
...@@ -119,6 +122,7 @@ public class AuthConfiguration { ...@@ -119,6 +122,7 @@ public class AuthConfiguration {
assertionHolderFilter.setFilter(filter("com.ctrip.framework.apollo.sso.filter.ApolloAssertionThreadLocalFilter")); assertionHolderFilter.setFilter(filter("com.ctrip.framework.apollo.sso.filter.ApolloAssertionThreadLocalFilter"));
assertionHolderFilter.addUrlPatterns("/*"); assertionHolderFilter.addUrlPatterns("/*");
assertionHolderFilter.setOrder(4);
return assertionHolderFilter; return assertionHolderFilter;
} }
......
...@@ -79,6 +79,9 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi ...@@ -79,6 +79,9 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi
}); });
result.forEach(function (favorite) { result.forEach(function (favorite) {
var app = appIdMapApp[favorite.appId]; var app = appIdMapApp[favorite.appId];
if (!app){
return;
}
app.favoriteId = favorite.id; app.favoriteId = favorite.id;
$scope.favorites.push(app); $scope.favorites.push(app);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment