Skip to content

Commit

Permalink
fix: custom CSS is shown on unauthenticated pages (#15110) (#15496)
Browse files Browse the repository at this point in the history
(cherry picked from commit 2078920)
  • Loading branch information
netroms authored Oct 26, 2023
1 parent 0a63f24 commit e16535d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,12 @@ private void configureAccessRestrictions(
// migrated
.antMatchers("/index.html")
.permitAll()
.antMatchers("/external-static/**")
.permitAll()
.antMatchers("/favicon.ico")
.permitAll()
.antMatchers("/oauth2/**")
.permitAll()
.antMatchers(apiContextPath + "/authentication/login")
.permitAll()
.antMatchers(apiContextPath + "/account/recovery")
Expand All @@ -442,12 +448,16 @@ private void configureAccessRestrictions(
.permitAll()
.antMatchers(apiContextPath + "/account")
.permitAll()
.antMatchers(apiContextPath + "/staticContent/*")
.antMatchers(apiContextPath + "/staticContent/**")
.permitAll()
.antMatchers(apiContextPath + "/externalFileResources/*")
.antMatchers(apiContextPath + "/externalFileResources/**")
.permitAll()
.antMatchers(apiContextPath + "/icons/*/icon.svg")
.permitAll()
.antMatchers(apiContextPath + "/files/style/external")
.permitAll()
.antMatchers(apiContextPath + "/publicKeys/**")
.permitAll()
.anyRequest()
.authenticated()
.accessDecisionManager(apiAccessDecisionManager());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ protected void configure(HttpSecurity http) throws Exception {
.permitAll()
.antMatchers("/impersonate")
.hasAnyAuthority("ALL", "F_IMPERSONATE_USER")
.antMatchers("/api/staticContent/**")
.permitAll()
.antMatchers("/dhis-web-commons/oidc/**")
.permitAll()
.antMatchers("/dhis-web-commons/javascripts/**")
Expand All @@ -161,14 +159,10 @@ protected void configure(HttpSecurity http) throws Exception {
.permitAll()
.antMatchers("/dhis-web-commons/fonts/**")
.permitAll()
.antMatchers("/api/files/style/external")
.permitAll()
.antMatchers("/external-static/**")
.permitAll()
.antMatchers("/favicon.ico")
.permitAll()
.antMatchers("/api/publicKeys/**")
.permitAll()
// Dynamic content
.antMatchers("/dhis-web-commons/i18nJavaScript.action")
.permitAll()
Expand Down

0 comments on commit e16535d

Please sign in to comment.