Skip to content

Commit

Permalink
Mark requests to /bundles default authenticated (#512)
Browse files Browse the repository at this point in the history
  • Loading branch information
zengyan-amazon authored Oct 6, 2020
1 parent c4571a6 commit 652746e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/apps/configuration/utils/role-list-utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export function transformRoleData(rawRoleData: any, rawRoleMappingData: any): Ro
.flatten()
.compact()
.value() as string[],
internalUsers: rawRoleMappingData.data[k || ''].users || [],
internalUsers: rawRoleMappingData.data[k || '']?.users || [],
backendRoles: rawRoleMappingData.data[k || '']?.backend_roles || [],
}));
}
Expand Down
2 changes: 1 addition & 1 deletion server/auth/types/authentication_type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export abstract class AuthenticationType implements IAuthenticationType {
public authHandler: AuthenticationHandler = async (request, response, toolkit) => {
// allow access to assets
if (request.url.pathname && request.url.pathname.startsWith('/bundles/')) {
return toolkit.notHandled();
return toolkit.authenticated();
}

// skip auth for APIs that do not require auth
Expand Down

0 comments on commit 652746e

Please sign in to comment.