-
Notifications
You must be signed in to change notification settings - Fork 165
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
Prevent access to entity list that is not published #467
Comments
Steps to reproduce:
|
Is it ready for testing? |
I'm not really sure if I understand this one well "You would be able to see dataset details, however when you click on "Data" tab it will throw 404 error". If the dataset/form isn't published yet, there isn't entity-list page with Data tab so I can't click it. If I try to access Entity-list page-Data tab by URL I get "Could not find the resource...". Is there other way to access the entity list Data tab or maybe it's not the Data tab I'm thinking about or we should just check via URL the 404 error? |
Those are "steps to reproduce", since we have fix the issue it is not reproducible. To verify the fix is correct, you have to test that you can't access unpublished "Entity list" by any means. |
Tested with Success! |
Tested with succcess! |
Problem description
It looks like entity lists that are not published are still accessible, at least to some extent. I think we should make them fully inaccessible.
In this project, I've created a single draft form that if published, would publish the project's first entity list: https://staging.getodk.cloud/#/projects/36/forms/trees_registration_demo/draft. Under "Entity List is updated by this Form:", "trees" links to the entity list overview. I don't think we should render a link if the entity list is new.
Clicking the link navigates to the entity list overview successfully. Instead, I think Backend should return a 404 if an entity list isn't published: https://staging.getodk.cloud/#/projects/36/entity-lists/trees. Clicking the Data tab does result in a 404, so we seem to be doing this for at least some endpoint.
Note that /v1/projects/:id/datasets does not return entity lists that are not published: https://staging.getodk.cloud/#/projects/36/entity-lists. I think /v1/projects/:id/datasets/:name should also prevent access to an entity list that is not published.
Screenshot
Central version shown in version.txt
The text was updated successfully, but these errors were encountered: