Skip to content
This repository was archived by the owner on Aug 30, 2021. It is now read-only.
This repository was archived by the owner on Aug 30, 2021. It is now read-only.

Articles created by deleted users cause server errors #1082

@jloveland

Description

@jloveland

I create an article with user1, then I delete user1 from the system. I log in as user2 and try to view the article created by user1. This causes a server error:
screen shot 2015-11-30 at 10 19 18 pm

We could solve this by checking to make sure article.user exists in articles.server.controller.js
here:
https://github.com/meanjs/mean/blob/master/modules/articles/server/controllers/articles.server.controller.js#L107

    if (article.user) {
      req.article = article;
    }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions