Skip to content

Commit

Permalink
profile: Fix node info listing to not require any tenant info headers.
Browse files Browse the repository at this point in the history
…Fixes #506
  • Loading branch information
sbrossie committed Dec 27, 2016
1 parent f7242b6 commit 9a9ee0a
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -136,9 +136,9 @@ private boolean shouldContinueIfTenantInformationIsWrongOrMissing(final ServletR
if ( // Chicken - egg problem if ( // Chicken - egg problem
isTenantCreationRequest(path, httpMethod) || isTenantCreationRequest(path, httpMethod) ||
// Retrieve user permissions should not require tenant info since this is cross tenants // Retrieve user permissions should not require tenant info since this is cross tenants
isPermissionRequest(path, httpMethod) || isPermissionRequest(path) ||
// Node request are cross tenant // Node request are cross tenant
isNodeCreationRequest(path, httpMethod) || isNodeInfoRequest(path) ||
// Metrics servlets // Metrics servlets
isMetricsRequest(path, httpMethod) || isMetricsRequest(path, httpMethod) ||
// See KillBillShiroWebModule#CorsBasicHttpAuthenticationFilter // See KillBillShiroWebModule#CorsBasicHttpAuthenticationFilter
Expand All @@ -157,16 +157,16 @@ private boolean shouldContinueIfTenantInformationIsWrongOrMissing(final ServletR






private boolean isPermissionRequest(final String path, final String httpMethod) { private boolean isPermissionRequest(final String path) {
return path != null && path.startsWith(JaxrsResource.SECURITY_PATH); return path != null && path.startsWith(JaxrsResource.SECURITY_PATH);
} }


private boolean isTenantCreationRequest(final String path, final String httpMethod) { private boolean isTenantCreationRequest(final String path, final String httpMethod) {
return JaxrsResource.TENANTS_PATH.equals(path) && "POST".equals(httpMethod); return JaxrsResource.TENANTS_PATH.equals(path) && "POST".equals(httpMethod);
} }


private boolean isNodeCreationRequest(final String path, final String httpMethod) { private boolean isNodeInfoRequest(final String path) {
return JaxrsResource.NODES_INFO_PATH.equals(path) && "POST".equals(httpMethod); return JaxrsResource.NODES_INFO_PATH.equals(path);
} }


private boolean isMetricsRequest(final String path, final String httpMethod) { private boolean isMetricsRequest(final String path, final String httpMethod) {
Expand Down

1 comment on commit 9a9ee0a

@pierre
Copy link
Member

@pierre pierre commented on 9a9ee0a Dec 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.