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

Return 403 rather than a 404 when acls cause all results to be filter… #3340

Merged
merged 2 commits into from
Jul 31, 2017

Conversation

preetapan
Copy link
Contributor

…ed out. This fixes #2637

@preetapan preetapan requested a review from slackpad July 31, 2017 18:51
Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

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

One tiny change to make on all the filters and then LGTM.

return ent[:FilterEntries(&df)]
filtered := ent[:FilterEntries(&df)]
if len(filtered) == 0 {
return filtered, errPermissionDenied
Copy link
Contributor

Choose a reason for hiding this comment

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

For all of these cases I'd return nil, errPermissionDenied, just to make it stand out that the filtered results aren't usable. It'll work the same way, but this makes it clear.

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

Successfully merging this pull request may close these issues.

KV API returning 404 for existing keys with ACLs enabled
2 participants