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

Allow REST access to raw node data from REST. #646

Merged
merged 1 commit into from
Oct 22, 2015

Conversation

pmeijer
Copy link
Contributor

@pmeijer pmeijer commented Oct 22, 2015

/api/projects/[ownerId]/[projectName]/commits/[commitHash]/tree/path/to/object

/api/projects/[ownerId]/[projectName]/branches/master/tree/path/to/object

Some tweaks and improvements to the storage, esp. w.r.t. loadPaths.

Some tweaks and improvements to the storage, esp. w.r.t. loadPaths.
})
.catch(function (err) {
if (err.message.indexOf('not exist') > -1 || err.message.indexOf('Not authorized to read') > -1 ) {
err.status = 404;
Copy link
Member

Choose a reason for hiding this comment

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

not authorized status code is 403

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was requested that if the user doesn't have read access the return code should be 404.
For two reasons;
The storage just checks if the user has the project in his/her project list (with read access) and does't check whether the project exists or not.
If the user doesn't have read access, he shouldn't even be able to get information about whether the project exists or not.

Copy link
Member

Choose a reason for hiding this comment

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

thanks

kecso added a commit that referenced this pull request Oct 22, 2015
Allow REST access to raw node data from REST.
@kecso kecso merged commit d652487 into master Oct 22, 2015
@pmeijer pmeijer deleted the feature/rest_raw_data_objs branch October 23, 2015 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants