Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users Route is disfunctional #17

Open
ramonski opened this issue Jan 26, 2018 · 2 comments
Open

Users Route is disfunctional #17

ramonski opened this issue Jan 26, 2018 · 2 comments
Assignees

Comments

@ramonski
Copy link
Contributor

Steps to reproduce

Navigate to the Users route /@@API/users

Current behavior

Route is not found

Expected behavior

Users are listed

Screenshot (optional)

image

@juangallostra juangallostra self-assigned this Jan 26, 2018
@juangallostra
Copy link

@ramonski should the route /@@API/users actually list the users? To navigate to the users I have to go to /@@API/senaite/v1/users.

If /@@API/users is expected to list the users I can work on that but I prefer to have first your confirmation.

@ramonski
Copy link
Contributor Author

Yes, exactly. It works similar to your settings route and the code is located here:
https://github.com/senaite/senaite.jsonapi/blob/master/src/senaite/jsonapi/v1/routes/users.py

However, the issue is that this route is kind of taken by the route registrations for the contents:
https://github.com/senaite/senaite.jsonapi/blob/master/src/senaite/jsonapi/v1/routes/content.py#L40

See the displayed message for e.g. https://senaite.ridingbytes.com/@@API/senaite/v1/users:

{
    "_runtime": 0.015951156616210938,
    "message": "Could not build url for endpoint 'senaite.jsonapi.v1.get' with values ['username']. Did you forget to specify values ['resource', 'uid']?",
    "success": false
}

Just take care that the users are only listed for authenticated users and not for anonymous.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants