21 Commits

Author SHA1 Message Date
OldHawk
8ce455ce88 feat(requests): accept response for request
* rewards score transfer
* request status check

#20
2018-01-12 16:53:24 +08:00
OldHawk
7eda0d271d feat(mongodb): mongodb3.5+ is unstable and error on $pushAll, meanTorrent can used on mongodb 3.5 3.6
#44
2017-12-15 09:17:41 +08:00
OldHawk
f052ea853e Merge commit 'b43c80e2c097b11114f4e4f01b9718321721a89b'
* commit 'b43c80e2c097b11114f4e4f01b9718321721a89b':
  feat(build): Update dependencies (#1847)
  fix(travis): Fix Travis failing on webdriver issues (#1845)
  fix(eslint): Inconsistent spacing before function parentheses (#1844)
  fix(mongodb): update ssl connection settings (#1809)
  Remove deprecated crypto package (#1843)
  feat(config): Mongo Seed 2.0 (#1808)
  fix(users): don't fail on missing old image on image upload (#1839)
  feat(build): Turn on mangling for uglify (#1841)
  fix(gulp): fix broken test:server:watch task (#1842)
  feat(core): Enhancement page title directive (#1686)
  feat(user): Add email support to forgot password (#1834)
  fix(mocha): update mochajs version to reduce vulnerabilities (#1830)
  refactor(menus): Refactor to the Menus client service to use functional loops/filters (#1575)
  feat(config): Mongoose 4.11 upgrade (#1818)

# Conflicts:
#	config/env/development.js
#	config/lib/app.js
#	modules/articles/server/models/article.server.model.js
#	modules/chat/client/config/chat.client.routes.js
#	modules/core/client/directives/page-title.client.directive.js
#	modules/core/client/services/menu.client.service.js
#	modules/users/client/config/users-admin.client.routes.js
#	modules/users/client/views/password/forgot-password.client.view.html
#	modules/users/server/models/user.server.model.js
#	package.json
2017-08-22 13:35:29 +08:00
Michael Leanos
eb9cdd784c feat(config): Mongo Seed 2.0 (#1808)
feat(config): Mongo Seed 2.0

Adds a more configurable and easily extended MongoDB Seed feature.

Adds additional options at the collection, and collection item level to
allow more control over how each environment config handles the seeding
feature.

Enforces seed order based on the order of the  environment's seeding configuration object.

Removes the previous SeedDB config file.

Adds chalk to messages logged to the console for readability.

Refactors the Mongo Seed configuration tests.

Adds Gulp tasks to perform Mongo Seed operations for default, prod, and
test environment configurations. Also, adds accommodating npm scripts.
2017-08-13 16:29:47 -07:00
Michael Leanos
dc880eb5a7 feat(config): Mongoose 4.11 upgrade (#1818)
Upgrades Mongoose to 4.11.1

Updates Mongoose connection implementation to accommodate deprecated
features & connection options.

Also, updates the Gulp Mocha tasks to reflect changes to the Mongoose
implementation.

Fixes tests to get the database from the existing Mongoose singleton.

Derives from changes in https://github.com/meanjs/mean/pull/1816

Closes https://github.com/meanjs/mean/issues/1814
2017-07-27 13:19:22 -07:00
OldHawk
10ed5c925a add Article model index on field user 2017-03-25 16:03:41 +08:00
Michael Leanos
0ea8cec120 fix(express): Incorrest uses of 400 error codes (#1553)
Fixes incorrest usage of 400 HTTP responses being returned from the
server, in favor of using 422.

Also, changed a few return codes to 401 where it was more appropriate.

See this article for reasoning behind moving to 422, and why 400 isn't
appropriate for these cases.

For ref:
6be12f8a06

Related:
https://github.com/meanjs/mean/pull/1547
https://github.com/meanjs/mean/pull/1510
2016-10-10 16:00:24 -07:00
Michael Leanos
89075cb8d3 feat(articles): Article Admin feature (#807)
This feature introduces a breaking change, that restricts the User's that
can create/edit/delete Articles to only those that have the `admin` Role.

Fixed ESLint issues.

Resolved merge conflicts, and moved new client Article Service
`createOrUpdate` functionality to new Admin feature controller.

Removed edit functionality from client-side Article controller.
2016-07-25 17:34:06 -07:00
Marek Grzybek
d14d5130af feat(config): Deprecate JSHint in favor of ESLint
Add basic ESLint setup extending well-known Airbnb code style.

Fixes #1072, #1097
2016-03-15 19:11:12 +01:00
mleanos
69b8a05ea2 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 #1146
2016-02-07 21:29:18 -08:00
Sébastien Combéfis
d2b2dfd606 fix(docs): Fix comments content and style
Changed some bad comments referencing the Articles module in other modules.
Typo fixed in xxx.client.modules.js files ("Application" => "Applicaion")
Full stop character removed at the end of line comments
2016-01-17 11:46:11 +01:00
mleanos
2bdde4e9e2 fix(articles): Orphaned User reference throws server error
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 #1082
2015-12-21 19:40:25 -08:00
Simon
be36823c7a Fix typo
indent and typo fixes
2015-09-14 13:19:21 -04:00
Liran Tal
903b4ca8a8 Dummy config directory for the articles module to make it easier for developers to understand and realize there's an actual per-module config/ directory/files that can be added 2015-09-06 23:23:48 +03:00
Ryan Hutchison
ef3a3f9548 formatting reboot (space-2 and consistency)
JSCS fixes

update editorconfig
2015-07-31 10:04:02 -04:00
Sebastien Vaucouleur
71167b0e75 The article middleware was calling getErrorMessage with a null argument, causing a crash when this method tried to access 'code' on an null parameter.
The bug was not exposed by the original test, since it was mixing two (related) aspects:

* An invalid Id (a badly formed mongodb identifier)
* An non-existent Id (an identifier with no corresponding document in the database)

Modifications:

- Fixed the message property in the article controller (the error message follows the wording of the error message in "users.password.server.controller.js", in case of username not found)
- Added a new test to check modifications and avoid regressions
2015-07-28 11:11:10 +02:00
Liran Tal
52fe443429 fixing err object which isnt present in this check, replacing it with a text message 2015-07-03 10:48:06 +03:00
Liran Tal
67e96a4f22 0.4.0 branch merged into master 2015-07-02 12:08:09 +03:00
Pedro Rodrigues
b2d76b82e5 Remove more unused requires 2015-04-23 17:51:58 +01:00
Christian Berendt
e027f4025b Add missing newline at the end of text files
On Unix it is common to have a newline at the end of text files.
2015-02-16 21:39:55 +01:00
Amos Haviv
ab81d61bd3 New 0.4 version 2014-11-10 23:12:33 +02:00