-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix search feature #163
Fix search feature #163
Conversation
The https module allows for an intermediate certificate in the options. It was somehow missed. Adding it back since I had a certificate that included an intermediate certificate.
- Check permission in search API - Fix author's name not show in search result
Since NodeJS 7, call async api without callback is deprecared.
Added 'access' check to search route Handle failed Ajax search request as 'No result'
Thanks @Meeeeow I'll check asap , awesome |
@@ -133,7 +133,11 @@ module.exports = function(config, auth, storage) { | |||
var getData = function(i) { | |||
storage.get_package(results[i].ref, function(err, entry) { | |||
if (!err && entry) { | |||
packages.push(entry.versions[entry['dist-tags'].latest]) | |||
auth.allow_access(entry.name, req.remote_user, function(err, allowed) { // TODO: This may cause performance issue? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reply of #161 (comment)
@Meeeeow
About the can('access')
, yeah you are right. No way to use the middleware. Perhaps you update allowed
as is_allowed
, to be consistent with the middleware.
About the performance, I haven't tested with thousands of packages, but, it worth to try in the future and see what's happen.
Aside of the small review, LGTM 👍 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Pick from fl4re's fork:
I'm not familiar with git and just destroyed my repo and lost some changes... So i deleted my GitHub repo and reopen a new PR here, sorry for this.
@juanpicado