Skip to content

Commit

Permalink
Merge branch 'release/v1.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
shiido committed Apr 20, 2021
2 parents 090a9d2 + 0c75074 commit fe986bb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ VOLUME /tmp

EXPOSE 8091

ADD ./target/st-zuul-server-1.3.2.jar st-zuul-server.jar
ADD ./target/st-zuul-server-1.5.0.jar st-zuul-server.jar

ENTRYPOINT java -Xmx$XMX -jar /st-zuul-server.jar --spring.profiles.active=$PROFILE --spring.cloud.config.uri=$CLOUD_CONFIG
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.ai.st.zuul</groupId>
<artifactId>st-zuul-server</artifactId>
<version>1.3.2</version>
<version>1.5.0</version>
<name>st-zuul-server</name>
<description>Sistema Transición - Servidor Perimetral</description>

Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/ai/st/zuul/oauth/ResourceServerConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,13 @@ public void configure(HttpSecurity http) throws Exception {
.antMatchers(HttpMethod.GET, "/api/workspaces/v1/municipalities/not-workspace/departments/{departmentId}").hasAnyRole(ROLE_ADMINISTRATOR)
// workspaces module
.antMatchers(HttpMethod.GET, "/api/workspaces/v1/workspaces/location").hasAnyRole(ROLE_ADMINISTRATOR, ROLE_MANAGER)
.antMatchers(HttpMethod.DELETE, "/api/workspaces/v1/workspaces/unassign/{municipalityId}/managers/{managerCode}").hasAnyRole(ROLE_ADMINISTRATOR)
// managers module
.antMatchers(HttpMethod.GET, "/api/workspaces/v1/managers/deliveries").hasAnyRole(ROLE_MANAGER)
.antMatchers(HttpMethod.GET, "/api/workspaces/v1/managers/deliveries/{deliveryId}").hasAnyRole(ROLE_MANAGER)
.antMatchers(HttpMethod.GET, "/api/workspaces/v1/workspaces/report-delivery/{deliveryId}").hasAnyRole(ROLE_MANAGER)
// integrations module
.antMatchers(HttpMethod.PUT, "/api/workspaces/v1/integrations/{integrationId}/configure-view").hasAnyRole(ROLE_MANAGER)

// microservice operators
.antMatchers(HttpMethod.GET, "/api/operators/v1/operators").hasAnyRole(ROLE_MANAGER, ROLE_ADMINISTRATOR)
Expand All @@ -176,9 +179,30 @@ public void configure(HttpSecurity http) throws Exception {

// microservice admininistrator
.antMatchers(HttpMethod.GET, "/api/administration/v1/users").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.PUT, "/api/administration/v1/users/recover").permitAll()
.antMatchers(HttpMethod.PUT, "/api/administration/v1/users/reset").permitAll()
.antMatchers(HttpMethod.GET, "/api/administration/v1/users/managers").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.GET, "/api/administration/v1/users/providers").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.GET, "/api/administration/v1/users/operators").hasAnyRole(ROLE_ADMINISTRATOR)

// microservice supplies
.antMatchers(HttpMethod.GET, "/api/supplies/v1/attachments-types").hasAnyRole(ROLE_ADMINISTRATOR)

// microservice products
.antMatchers(HttpMethod.POST, "/api/products/v1/deliveries").hasAnyRole(ROLE_OPERATOR)

/**
* Services V2
*/
.antMatchers(HttpMethod.GET, "/api/workspaces/v2/municipalities/{managerCode}/not-belong/departments/{departmentId}").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.GET, "/api/workspaces/v2/workspaces/validate-municipalities-to-assign").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.POST, "/api/workspaces/v2/workspaces/assign-manager").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.GET, "/api/workspaces/v2/workspaces/{workspaceId}/download-support-manager/{managerCode}").hasAnyRole(ROLE_ADMINISTRATOR, ROLE_MANAGER)
.antMatchers(HttpMethod.PUT, "/api/workspaces/v2/workspaces/{workspaceId}/managers/{managerCode}").hasAnyRole(ROLE_ADMINISTRATOR)
.antMatchers(HttpMethod.PUT, "/api/workspaces/v2/workspaces/{workspaceId}/operators/{operatorCode}").hasAnyRole(ROLE_MANAGER)
.antMatchers(HttpMethod.GET, "/api/workspaces/v2/workspaces/{workspaceId}/download-support-operator/{operatorCode}").hasAnyRole(ROLE_ADMINISTRATOR, ROLE_MANAGER)

.antMatchers(HttpMethod.GET, "/api/supplies/v2/supplies/xtf/{municipalityCode}").hasAnyRole(ROLE_MANAGER)

// others services
.anyRequest().denyAll().and().cors().configurationSource(corsConfigurationSource());
Expand Down

0 comments on commit fe986bb

Please sign in to comment.