Commit Graph

83 Commits

Author SHA1 Message Date
Francis Daigle
ba85dccb00 fix(core): Add "additionalProvidersData" to "safeUserObject"
Needed for management of social accounts.
2016-02-08 14:49:33 -07:00
Cody B. Daig
43b8caeb58 Merge pull request #1143 from trendzetter/master
feat(config): upgrade angular-bootstrap from 0.13 to 1.0
2016-01-29 11:49:39 -07:00
Andrew Throener
48eabd02ed fix(core menu): Menuize the account routes so they can be added to by submodules
Newlines fix

Removed Comment
2016-01-25 19:40:05 -06:00
Joris Willems
9cd4ceca46 feat(config): Upgrade angular-bootstrap 0.13 to 1.0
Many issues arise when using angular-bootstrap 0.13. Migration to 1.0 is
straightforward, offers a more stable interface, extra directives and fixes
many bugs.
Migration guide:
https://github.com/angular-ui/bootstrap/wiki/Migration-guide-for-prefixes

Fixes #1142
Fixes #1131
2016-01-17 22:06:34 +01:00
Liran Tal
6658774569 Merge pull request #1128 from mleanos/bugfix/gh-1127
fix(users): ProfileImageURL sanitize with ngSanitize
2016-01-17 19:16:30 +02: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
f88f28e035 fix(users): Profile image path is invalid after escaping
Removes the validator.escape on the profileImageUrl field in core server
controller.

The escaping was causing the profileImageUrl field to be an invalid path
for the image. We don't need to worry about xss vulnerabilities on this
field because no user input is provided; the name & path are generated
by the application logic.

Fixes #1127
2016-01-15 12:39:17 -08:00
Liran Tal
b9e3fd1625 Merge pull request #1119 from lirantal/bugfix/xss_and_validations
fix(security): fixing possible xss issue in parsed objects
2016-01-02 10:45:15 +02:00
Liran Tal
2b0ae863a0 fix(security): fixing possible xss issue in parsed objects
Fixes #1106
2015-12-30 16:41:05 +02:00
mleanos
bfcfb555ff fix(core): Client routes guest access bug
Adds a check for the existence of the "guest" role in the state configuration
that we're transitioning to, in the core $stateChangeStart event handler. If
it exists, then we allow access.

Also, added validation of Authentication.user object. While writing
tests, I ran into an issue here when the Authentication service wasn't injected
into a controller. Probably best to have this check in place.

Fixes https://github.com/meanjs/mean/issues/1098
2015-12-29 23:28:14 -08:00
Cody B. Daig
b12be5fca5 Merge pull request #1107 from pgrodrigues/master
fix(core): Remove duplicate angular interceptor
2015-12-28 19:41:24 -08:00
Liran Tal
0744ce5d96 fix(tests) fixing assertion test for logger which failed on undefined variable 2015-12-28 10:24:32 +02:00
Pedro Rodrigues
996976ac66 fix(core): Remove duplicate angular interceptor
Remove the interceptor defined in the users module
Update the interceptor defined in the core module
Update the respective test

Fixes #1096
2015-12-16 14:55:07 +00: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
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
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
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
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
jloveland
2eb0b0970d adding ability to configure session.secret in local env config 2015-10-04 20:45:47 -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
Liran Tal
6f8b5bfd58 adding tests for meanjs core server functionality 2015-09-28 11:29:42 +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
Ryan Hutchison
3bf07fe4ec Remove data- prefix from attributes 2015-08-25 12:34:40 -04:00
Liran Tal
01bd98b386 Merge pull request #759 from Gym/client-side-validation
client-side form validation with ng-messages.
2015-08-25 16:19:22 +03:00
Liran Tal
05355b986d Merge pull request #842 from Gym/fb-enhancements
Facebook authentication
2015-08-25 16:14:06 +03:00
Ryan Hutchison
801547602b client-side form validation with ng-messages.
remove data prefix from attributes.

fix tests
2015-08-25 02:02:18 -04:00
Andrew Throener
ed89f9ea08 Unauthorized client routing
Added Auth Interceptor tests

cleaned up test

Update routes
2015-08-24 17:04:36 -05:00
Liran Tal
979c4e56a4 Merge pull request #846 from lirantal/feature/refresh-homepage-links
Refreshing the M.E.A.N links and description in the homepage
2015-08-24 09:40:16 +03:00
Liran Tal
4a65439b19 Refreshing the M.E.A.N links and description in the homepage 2015-08-24 00:17:02 +03:00
Liran Tal
b8147cb278 Merge pull request #844 from Gym/404-behavior
mask exception route for 404 responses.
2015-08-23 23:40:44 +03:00
Ryan Hutchison
c6d26831fc do not save state to previous (history) for routes marked ignoreState. 2015-08-23 04:09:36 -04:00
Ryan Hutchison
9fdd2a0b9c mask exception route, but show not-found page. 2015-08-23 03:59:43 -04:00
Ryan Hutchison
b2495120c3 use pushstate, fall back to window.location.hash.
current implementation does double redirect due to '#!'
2015-08-23 00:48:17 -04:00
cdriscol
ec3af65661 Fixing Menus service remove bugs. 2015-08-15 12:40:00 -06:00
Cody B. Daig
1f7bfddf0b Make tests pass 2015-08-14 16:01:16 -06:00
Cody B. Daig
9fc6091ab7 Code from mleanos 2015-08-14 16:01:16 -06:00
Cody B. Daig
e68b4226bd Make TopBar Public By Default 2015-08-14 16:01:16 -06:00
Andrew Throener
d319f9203f Initial commit to return /client to the URL include paths
Conflict Resolve

Fixed Karma testing

Added back cacheIDFromPath as I am not sure what that does.  Just removed the replaceing of /client
2015-08-13 11:07:02 -05:00
Ryan Hutchison
ef3a3f9548 formatting reboot (space-2 and consistency)
JSCS fixes

update editorconfig
2015-07-31 10:04:02 -04:00
Cody B. Daig
c539cdb281 Modify Generator Refrences/Docs 2015-07-29 23:48:24 -07:00
Ilan Biala
612a76cda6 Merge pull request #728 from cdriscol/angular_tests
Add client side tests
Fixes #663
2015-07-29 10:31:29 -04:00
Igor Freire
e6a35a7f9a Enable redirection to previous page after login
Two different strategies are adopted, one for when the user authenticates locally and the other through providers. When authenticating locally, the signin function in the client controller redirects to the previous state (storing and using a state name) after successful login. When authenticating through a provider, the first call to provider stores the previous URL (not state, URL) in the session. Then, when provider actually calls the authentication callback, session redirect_to path is used for redirecting user.
2015-07-29 10:55:47 -03:00
cdriscol
d5ea5c99d2 Adding client test coverage. 2015-07-29 06:51:38 -06:00
Liran Tal
e1ca1aa334 Merge pull request #676 from Gym/admin-feature
Admin module
2015-07-25 21:29:33 +03:00
Liran Tal
d7f96227eb Merge pull request #685 from codydaig/pull664
Move livereload, image, and favicon to config
2015-07-25 11:35:47 +03:00