forked from meanjs/mean
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(articles): Article edit/delete validation
Adds a custom field named `isCurrentUserOwner` to the Article document before it's returned to the client. This field is used to determine if the current User should is the "owner", and should see the edit/delete controls on the client-side when viewing a single article. This custom (ad-hoc) field is NOT persisted to the database; it's merely attached to the document. Added server-side route tests for verifying the ad-hoc "isCurrentUserOwner" field is properly set on the a single Article document. Fixes meanjs#1146
- Loading branch information
Showing
3 changed files
with
166 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters