Commit Graph

177 Commits

Author SHA1 Message Date
Ilan Biala
63d0d71cf6 Merge pull request #948 from gustavodemari/update-multer-profile-upload
Update profile upload with a new version of multer
Fixes #947
2015-10-25 22:03:23 -04:00
mleanos
8cd2291a6a Enable log options for Morgan
Adds the log options, and format to the Morgan middleware in the Express
configuration.

These options are defined in the environment configurations.

The implementation derived from https://github.com/meanjs/mean/pull/254
by @lirantal, which somehow got overlooked when merging 0.4.0 into
master.

Added tests for the Logger configuration.

Added the log settings to the Test env config.

Added environment variables for the log settings in the Test &
Production env configs.

Moved the Morgan Express middleware outside of the NODE_ENV ===
'development' check. Morgan should be used in all environments, and use
the settings set in each env config.

Changed the wording of the Stream option comments in the env configs.

Added Rotating Logs functionality, and refactored the log Stream
options. Added a new npm package, FileStreamRotator, for use with
Morgan's rotating logs functionality.

Also, refactored the log configuration tests to be more maintainable.

Added more tests, and refactored test suite to use mock-fs.
2015-10-20 21:03:07 -07:00
gustavodemari
7ecf9337ce updating profile upload with a new version of multer 2015-10-18 20:56:12 -02:00
mleanos
e6a5732698 Favicon invalid path
Removed the {{url}} from the Favicon path. This fixes the intermittent
issues with the path resolving to an invalid location.

Removed the url from the twitter:image & og:image tags, to be static
references to the logo.
2015-10-17 16:17:28 -07:00
Ilan Biala
cc486d54c5 Merge pull request #910 from jloveland/hide-password-validator
Hide the password strength progress when the field is empty
2015-10-16 23:34:55 -04:00
Ilan Biala
0323696eaf Format code according to ESLint rules 2015-10-16 20:52:31 -04:00
Liran Tal
e30c3d1249 Merge pull request #957 from mleanos/seeddb-enhance-testability
Seed options - logResults
2015-10-15 17:24:28 +03:00
jloveland
65140442f0 adding tests for directives 2015-10-13 23:23:52 -04:00
jloveland
f733efba5a renaming strength meter, hiding when password field is empty, and refactoring directives to use $validators 2015-10-13 22:47:35 -04:00
Liran Tal
8a12f76a19 Merge pull request #972 from mleanos/mocha-global-timeout-grunt
Global Mocha timeout
2015-10-13 08:39:48 +03:00
Liran Tal
0017886d6e updating travis to support installing a local mail server 2015-10-11 23:19:20 +03:00
Liran Tal
eb7c4f8e91 adding more API tests 2015-10-11 23:19:20 +03:00
mleanos
037878b4ba Global Mocha timeout
Added the timeout option to the Mocha grunt task; set to 10000.

Removed the individual test suite timeouts, for all server tests.

Also, added global timeout for Mocha gulp task.
2015-10-10 23:52:08 -07:00
Liran Tal
19aea2f112 Merge pull request #967 from mleanos/user-model-validate-bug
[bug] Solves User model validation issue with tests [fixes #966]
2015-10-10 21:40:34 +03:00
mleanos
32e0d126ca Synchronous tests
Removed the done() callback method from the config tests that aren't
truly asynchronous.
2015-10-09 16:14:14 -07:00
mleanos
75cf74537a Formatting and Indentation
Changes to formatting and indentation.
2015-10-09 14:06:29 -07:00
mleanos
0560062eab Seed options - logResults
Added an options object to the database seed configuration. Currently,
the only option implemented is `logResults`; set using the seedDB env
config
options (default to "true").

Modified the definition of the env config for seedDB. It's now an
object, with
options.

Setting the logResults option is set to `false` in the core
configuration server test suite.

Also, fixed an issue with how env configs were reading the seedDB
setting from the env variables. Previously, the config was getting set
by
looking for merely the existence of the env variable (MONGO_SEED).
However,
if this setting existed but was set to "false", the seedDB would be
turned on.

Added the SeedDB user details to the env config, and seedDB options.

Added tests to the core server config test suite

should have seedDB configuration set for "regular" user
should have seedDB configuration set for admin user
should seed admin, and "regular" user accounts when NODE_ENV is set to
"test" when they already exist
should ONLY seed admin user account when NODE_ENV is set to "production"
with custom admin
should seed admin, and "regular" user accounts when NODE_ENV is set to
"test" with custom options
should NOT seed admin user account if it already exists when NODE_ENV is
set to "production"
should NOT seed "regular" user account if missing email when NODE_ENV
set to "test"

Added support for environment variables to seedDB env configs; currently
only supporting username & email.

Refactored how the SeedDB rejects were being handled
2015-10-09 13:48:11 -07:00
jloveland
b07af94255 adding return done() to tests 2015-10-09 12:45:16 -04:00
Liran Tal
28ae5d6301 Merge pull request #927 from jloveland/local-session-secret
adding ability to configure session.secret in local env config
2015-10-07 18:49:06 +03:00
Liran Tal
3cfd978e8a Merge pull request #922 from lirantal/feature/travis-add-node-v4-gcc-update
NodeJS v4 support - fixing the failed build
2015-10-06 14:22:47 +03:00
Liran Tal
b7a57abd30 adding the required support to properly build the nodejs v4 edition
updating grunt-node-inspector version to compatible version with nodejs v4
2015-10-06 14:09:04 +03:00
mleanos
288f0b4e63 Solves User model validation bug
This solves the issue of the User model's pre('validate') method,
attempting to validate against a password that was not modified.

Adds the this.isModified('password') check to the condition.
2015-10-05 16:41:14 -07:00
jloveland
2eb0b0970d adding ability to configure session.secret in local env config 2015-10-04 20:45:47 -04:00
Ilan Biala
7a9ee53357 Merge pull request #939 from jloveland/e2e-tests-fix
Fix grunt and gulp e2e tests, Fixes #929
2015-10-04 12:49:42 -04:00
mleanos
3b375e62d8 Mocha test timeouts [fixes #955]
Added a timeout of 10000 ms to each server test file. This is an attempt
to solve the timeout issues that we're experiencing with the Mocha
tests. Especially, this is hoping to address the build fails that are
caused by such timeouts.

Issue is described in https://github.com/meanjs/mean/issues/955
2015-09-30 19:50:07 -07:00
Liran Tal
7fcd4f2ed3 Merge pull request #937 from lirantal/feature/seeddb-refactoring
SeedDB Refactoring
2015-09-30 12:55:49 +03:00
jloveland
fdf1ad571b fixing grunt and gulp e2e tests 2015-09-29 08:21:43 -04:00
Liran Tal
cc80930081 Merge pull request #904 from jloveland/jshint-single-quotes
fixing jshint single quotes issues
2015-09-28 23:47:13 +03:00
Liran Tal
6f8b5bfd58 adding tests for meanjs core server functionality 2015-09-28 11:29:42 +03:00
Liran Tal
988609399a refactoring the seeddb logic to work with promises all over due to all the async behavior 2015-09-28 11:29:39 +03:00
jloveland
96bcd6d646 fixing spacing 2015-09-27 12:58:06 -04:00
Ilan Biala
5901b17926 Merge pull request #901 from igorauad/fixRedirection
Fix redirection to previous state after required authentication
2015-09-26 14:18:40 -04:00
Liran Tal
b800141c41 Merge pull request #921 from mleanos/dbseed-user-passwords
[hotfix] Fixes db seed password bug
2015-09-25 08:37:40 +03:00
Liran Tal
cdd6a7970b Merge pull request #924 from lirantal/bugfix/923-ssl-support-for-password-reset
Fixed #923 - password reset links SSL support
2015-09-24 00:08:48 +03:00
mleanos
3d37e20128 Repeating Characters condition
Added a regular expression test to the while condition, in order to
ensure no repeat characters are present in the generated password.
2015-09-22 04:02:31 -07:00
mleanos
1c7d74298b [hotfix] Fixes db seed password bug
Fixes the database seeding bug with the password not passing the owasp
test.

Adds a UserSchema static method that generates a random passphrase that passes
the owasp test.

Performed minor refactoring of the database seed configuration to
implement the new UserSchema method.

Added model test for the UserSchema generateRandomPassphrase static method.
2015-09-22 02:23:30 -07:00
Liran Tal
de354ee6d6 adding route tests for user/admin CRUD operations 2015-09-21 20:18:24 +03:00
Liran Tal
1eddc471db updating comments for tests in code 2015-09-20 18:35:52 +03:00
Igor Freire
2b8bee0c8c Fix redirection to previous state after required authentication
Fixes the issue with the previous state not being recorded, when the
unauthenticated user is redirected to the signin state, when trying to
access a restricted route.

Added a function that stores the provided state & state params, in the
$state.previous object. This has been implemented in the
$stateChangeSuccess event, and the callback of the $state.go transition
when the user is not allowed to access the requested route.
2015-09-19 16:34:17 -03:00
Liran Tal
b824ebce97 fixed bug #923 - making password reset links work for both http and https configuration 2015-09-19 11:00:47 +03:00
Simon
be36823c7a Fix typo
indent and typo fixes
2015-09-14 13:19:21 -04:00
jloveland
a38abd0f8c fixing jshint issues by requiring single quotes 2015-09-11 12:47:19 -04:00
Liran Tal
bd1a7d7b99 Merge pull request #890 from lirantal/feature/article-module-dummy-config-dir
Adding sample config/ directory for articles module
2015-09-11 08:52:22 +03:00
jloveland
1fd6bb6119 adding stronger password requirements for improving security based on OWASP 2015-09-07 22:11:02 -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
Liran Tal
320826bde8 Merge pull request #866 from almegdad/0.4.0
Reopened: Force Username & Email to Lowercase + Remove Sensitive Data
2015-09-02 09:50:27 +03:00
almegdad
aafa5e69cf Force Lowercase & Remove Sensitive Data
* add directive to force username & email lowercase
* remove sensitive data in password reset
* 2 space indentation  in reset & forgot password views
2015-09-01 21:09:20 +03:00
Liran Tal
70513452b0 Merge pull request #811 from lirantal/feature/code-coverage
Adding coverage report for server-side tests using istanbul
2015-09-01 16:22:36 +03:00
mleanos
14b8dd4dce Fixed User model tests
PR #840 changed the global var `user` to `user1`. This was merged and
then #858 was merged, which was still referencing the global var as
`user` in the new *roles* tests. This was causing jshint failures from
the new

This change updates the new *roles* tests to use `user1`
2015-08-30 15:53:29 -07:00
Liran Tal
8335aa7070 Merge pull request #858 from mleanos/admin-users-require-role
Admin users require role
2015-08-30 21:55:58 +03:00