Commit 13d63d38 by 张乐 Committed by GitHub

Merge pull request #469 from nobodyiam/portal-bugfix

fix filter precedence bug and js bug
parents 96fd956e 85338f8e
......@@ -5,6 +5,7 @@ import javax.servlet.DispatcherType;
import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import com.dianping.cat.servlet.CatFilter;
......@@ -18,6 +19,7 @@ public class CatConfig {
bean.setName("cat-filter");
bean.addUrlPatterns("/*");
bean.setDispatcherTypes(DispatcherType.REQUEST, DispatcherType.FORWARD);
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return bean;
}
......
......@@ -65,6 +65,7 @@ public class AuthConfiguration {
FilterRegistrationBean singleSignOutFilter = new FilterRegistrationBean();
singleSignOutFilter.setFilter(filter("org.jasig.cas.client.session.SingleSignOutFilter"));
singleSignOutFilter.addUrlPatterns("/*");
singleSignOutFilter.setOrder(1);
return singleSignOutFilter;
}
......@@ -83,6 +84,7 @@ public class AuthConfiguration {
casFilter.setInitParameters(filterInitParam);
casFilter.setFilter(filter("com.ctrip.framework.apollo.sso.filter.ApolloAuthenticationFilter"));
casFilter.addUrlPatterns("/*");
casFilter.setOrder(2);
return casFilter;
}
......@@ -102,6 +104,7 @@ public class AuthConfiguration {
casValidationFilter.setFilter(filter("org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter"));
casValidationFilter.setInitParameters(filterInitParam);
casValidationFilter.addUrlPatterns("/*");
casValidationFilter.setOrder(3);
return casValidationFilter;
......@@ -119,6 +122,7 @@ public class AuthConfiguration {
assertionHolderFilter.setFilter(filter("com.ctrip.framework.apollo.sso.filter.ApolloAssertionThreadLocalFilter"));
assertionHolderFilter.addUrlPatterns("/*");
assertionHolderFilter.setOrder(4);
return assertionHolderFilter;
}
......
......@@ -79,6 +79,9 @@ function IndexController($scope, $window, toastr, AppUtil, AppService, UserServi
});
result.forEach(function (favorite) {
var app = appIdMapApp[favorite.appId];
if (!app){
return;
}
app.favoriteId = favorite.id;
$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