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

fix(articles): Orphaned User reference throws server error #1108

Merged
merged 1 commit into from
Dec 23, 2015

Conversation

mleanos
Copy link
Member

@mleanos mleanos commented Dec 16, 2015

Adds an additional check for the existence of a populated user reference, when determining if the current user has immediate access to the requested article.

Without this fix, the server will throw an error if the requested article doesn't have a populated user field.

Modified the article & articles list view's to check if the article has a populated user. If not, then it will display "Deleted User" in place of the missing user reference.

Fixes #1082

@lirantal
Copy link
Member

LGTM.
@codydaig @ilanbiala ?

@lirantal lirantal added this to the 0.5.0 milestone Dec 21, 2015
@ilanbiala
Copy link
Member

LGTM, just squash into 1 commit.

Adds an additional check for the existence of a populated user
reference, when determining if the current user has immediate access to
the requested article.

Without this fix, the server will throw an error if the requested
article doesn't have a populated user field.

Modified the article & articles list view's to check if the article has
a populated user. If not, then it will display "Deleted User" in place
of the missing user reference.

Added a server-side test that ensures we can get a single article if
the article.user field is referencing a deleted user.

Fixes meanjs#1082
@mleanos mleanos force-pushed the hotfix/Articles-Orphaned-Users branch from 704d57a to 2bdde4e Compare December 22, 2015 03:41
@mleanos
Copy link
Member Author

mleanos commented Dec 22, 2015

@lirantal @ilanbiala Squashed

@lirantal
Copy link
Member

Thanks @mleanos!

lirantal added a commit that referenced this pull request Dec 23, 2015
fix(articles): Orphaned User reference throws server error
@lirantal lirantal merged commit 111d85b into meanjs:master Dec 23, 2015
@mleanos
Copy link
Member Author

mleanos commented Dec 23, 2015

Sure, np! @lirantal

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

Successfully merging this pull request may close these issues.

Articles created by deleted users cause server errors
3 participants