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

exports.updateLatest should use exports.isMaintainer #283

Closed
wenbing opened this issue Mar 19, 2014 · 3 comments
Closed

exports.updateLatest should use exports.isMaintainer #283

wenbing opened this issue Mar 19, 2014 · 3 comments
Assignees
Labels
Milestone

Comments

@wenbing
Copy link
Contributor

@wenbing wenbing commented Mar 19, 2014

in controllers/registry/module.js

exports.updateLatest

in lib/common.js

exports.isMaintainer

现在的判断是

var match = nextMod.package.maintainers.filter(function (item) {
    return item.name === username;
  });
  if (match.length === 0) {
    this.status = 401;
    this.body = {
      error: 'noperms',
      reason: 'Current user can not publish this module'
    };
    return;
  }
@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 19, 2014

any details?
2014年3月19日 PM1:18于 "wenbing" notifications@github.com写道:


Reply to this email directly or view it on GitHubhttps://github.com//issues/283
.

@wenbing wenbing changed the title controllers/registry/module.js exports.updateLatest should use lib/ exports.updateLatest should use exports.isMaintainer Mar 19, 2014
@dead-horse
Copy link
Member

@dead-horse dead-horse commented Mar 20, 2014

good. i'll fix this.

fengmk2 added a commit that referenced this issue Mar 20, 2014
use common.isMaintainer, fixed #283
@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Mar 20, 2014

cnpmjs.org@0.3.11 publish

@fengmk2 fengmk2 added the bug label Mar 20, 2014
@fengmk2 fengmk2 added this to the v0.3 koa milestone Mar 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants