Skip to content
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
This repository was archived by the owner on Oct 27, 2020. It is now read-only.

WebApiNoAuth bug #348

@andreaskring

Description

@andreaskring

The @WebApiNoAuth annotation is not working on a MultiPartResourceAction.Create method unless another EntityResourceAction.Create method is present in the same class.

Steps to reproduce:

  1. Clone the sandbox project located here and see the https://github.com/andreaskring/alfresco-sdk4-sandbox/blob/master/src/main/java/dk/magenta/sdk4/webscripts/SandboxEntityResource.java#L29
  2. A POST request to the endpoint above with e.g. curl -i -X POST -F 'xyz=abc' http://localhost:8080/alfresco/api/-default-/public/sandbox/versions/1/sandbox will respond with a HTTP status code 401.
  3. If an extra endpoint is added to the class by using the EntityResourceAction.Create interface, and if this new endpoint method is annotated with the @WebApiNoAuth annotation, then the above mentioned endpoint in line 29 wil suddenly start to work as expected, i.e. it can be called without authentication.

So the presence of one endpoint affects the authentication properties of another endpoint, and I guess that this is not the expected behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions