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

Comments

Projects
None yet
3 participants
@wenbing
Contributor

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

This comment has been minimized.

Member

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 from controllers/registry/module.js exports.updateLatest should use lib/ to exports.updateLatest should use exports.isMaintainer Mar 19, 2014

@dead-horse

This comment has been minimized.

Member

dead-horse commented Mar 20, 2014

good. i'll fix this.

fengmk2 added a commit that referenced this issue Mar 20, 2014

Merge pull request #284 from cnpm/issue283-maintainer
use common.isMaintainer, fixed #283
@fengmk2

This comment has been minimized.

Member

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