Commit Graph

180 Commits

Author SHA1 Message Date
OldHawk
6de8eac7b6 add many fields for torrents about 2017-03-25 16:05:26 +08:00
Laurence Tennant
f53db0f2e2 Better autofocus (#1664) 2016-12-13 18:51:19 -08:00
Laurence Tennant
2b6cf53d30 fix(users): Better MIME-type checking, remove image cropping library (#1589)
* Cropping remove, nicer UI

* Fix MIME-type checking, add image upload tests

* Change image config settings to uploads.profile.image to build a more
rational structure for configuring other types of uploads
2016-11-15 15:59:47 -08:00
Sujeeth
fb9d9d912c feat(user): add strict validations for username (#1574)
Idea proposed by @sparshy #1204
Suggestions, rules and tests from Trustroots @simison
Added validations on user server model
Added client side validations
Added relevant tests on user server tests
Added relevant tests on user e2e tests

Fixes #1204
2016-10-19 20:40:26 -07:00
itelo
0e2ea65918 fix(users): fix redirect when signup or add provider (#1573)
Fixes the issue of the redirect after Social login authentication, on signup or user profile add provider.
2016-10-19 17:12:47 -07:00
Pierre Brisorgueil
ae638893b2 fix(users): test for usernameOrEmail (#1582) 2016-10-19 18:59:45 +03:00
mleanos
99e5803eae Fix client-side tests after removing <base/>
Fixes the client-side tests after the removal of the <base/> tag from
the main layout.

These fixes aren't ideal. At the moment, they will suffice. This comment
(https://github.com/angular-ui/ui-router/issues/212#issuecomment-60803437),
among others in that issue, led me to choose this method as the fix to
avoid having to change any other core code.
2016-10-10 17:11:25 -07:00
mleanos
c065246a23 Update path in tests
Updated tests to account for new "/" prefix in the path.
2016-10-10 16:05:10 -07:00
Cameron Behar
aebaf2ff74 fix(core): Remove the <base> tag. 2016-10-10 16:05:10 -07: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
Sujeeth
607ed061e3 feat(core): add notification feedback with angular-ui-notification (#1532)
Added visual notification for user/article updates
angular-ui-notification config added to core client config
Notification idea from #369
2016-10-10 14:51:44 -07:00
shanavas
5725c449c7 Fix(Users): Remove redundant request body (#1554) 2016-10-09 12:00:47 +03:00
itelo
4aa5d77251 feat(core): change console in angular to (#1551)
logs with $log in client idea proposed by @simison
also removed unnecessary consoles in users.password.server.controller.js

Fixes #1541
2016-10-08 21:43:27 -07:00
Michael Leanos
6be12f8a06 fix(core): Add custom 400 and 404 error messages (#1547)
* Added 400 and 404 custom error messages

* nicer error message views

* Sign Up & Sign In error responses

Changed the error responses returned from the Sign Up & Sign In API
calls to use 422 rather than 400.

For insight into why this change was made:
https://github.com/meanjs/mean/pull/1510#issuecomment-247435378

For reference on why to use 422 over 400:
https://www.bennadel.com/blog/2434-http-status-codes-for-invalid-data-400-vs-422.htm
2016-10-07 22:03:31 -07:00
itelo
6a6b630292 feat(users): change username to usernameOrEmail in signin (#1545)
* feat(users): change username to usernameOrEmail in signin

* fix(users): toLowerCase at email in local strategy
2016-10-06 18:34:15 +03:00
hyperreality
73a7c2cf61 feat(core): Minor UI fixes for mobile; autofocus (#1499)
* Added configuration for owasp. Synchronize client owap configs with the server configs.
Also added a time indicator on failed login attempts to give the user feedback on subsequent failed login attempts.

* switched to handlebar template for passing the server's owasp config down to the client.

reverted some of the other changes (regarding the http request).

* Removed debug code.

* Changed variable name to owaspConfig

* Fixed minor type-o's and set owasp.config() rather than the underlying configs.

* chore(tidy): tidying up minor lint and layout issues

* fix(lint): CSS alphabetize warnings (#1498)

Fixes css lintings warnings of properties not alphabetized.

* fix(authentication) Stops error on signin/signup (#1495)

Uses the passport info object to simplify login and remove the need to
temporarily cache the redirect within the session.

* Moved owasp config into default and reverted other config files.

Modified config to be "shared". This will allow future configurations to be easily passed to the client.

* fixed 403 redirect if not signed in (#1496)

* Update form-article.client.view.html

For New Article, delete function no required

* UI changes for mobile; autofocus

* fixed broken password popover balloon

* add e2e test for autofocus

* Remove test, fix delete social login button

* feat(core): Move template to .github folder

* Deprecated $http success/error promise methods (#1508)

Replaces the $http service calls with promise based methods
of the client-side UsersService for the following:
  Users Change Password
  Users Manage Social Accounts
  Users Password Forgot
  Users Password Reset
  Users Signup
  Users Signin

Modifies tests to reflect changes.

Closes #1479

* rebase
2016-10-04 21:14:57 -07:00
Sujeeth
287f81c6dd fix(user): remove bad request for local.png (#1538)
Removes a bad image request from manage social account settings page
Ideas from #1537, suggestions from @mleanos

Fixes #1537
2016-10-01 17:18:06 -07:00
sujeethk
0736a404c9 fix(user): hide delete button for self (#1535)
Remove delete button for self

Fixes #1531
2016-10-01 12:17:15 -07:00
Daron Jones
e3eafa6131 fix(users) Handle missing email - OAuth (#1501)
* fix(users) patch OAuth default email issue

- Intentionally omits setting email in constructor to trigger defaults when
creating user. Handles cases where email is not authorized/given by provider.

Related to issue #1250
2016-09-20 21:24:16 -07:00
Michael Leanos
fa138045e6 Deprecated $http success/error promise methods (#1508)
Replaces the $http service calls with promise based methods
of the client-side UsersService for the following:
  Users Change Password
  Users Manage Social Accounts
  Users Password Forgot
  Users Password Reset
  Users Signup
  Users Signin

Modifies tests to reflect changes.

Closes #1479
2016-09-17 12:05:21 -07:00
Liran Tal
4f3a501063 feat(angular): added owasp configuration for frontend
Added configuration for owasp. Synchronize client owap configs with t…
2016-09-13 00:19:41 +03:00
walter
0588eaba48 Moved owasp config into default and reverted other config files.
Modified config to be "shared". This will allow future configurations to be easily passed to the client.
2016-09-12 11:53:22 -07:00
Daron Jones
67d1a5a1f6 fix(authentication) Stops error on signin/signup (#1495)
Uses the passport info object to simplify login and remove the need to
temporarily cache the redirect within the session.
2016-09-11 12:29:05 -07:00
Michael Leanos
b2a5cb5b6f fix(lint): CSS alphabetize warnings (#1498)
Fixes css lintings warnings of properties not alphabetized.
2016-09-09 22:28:14 -07:00
walter
8dcf3f6728 Fixed minor type-o's and set owasp.config() rather than the underlying configs. 2016-09-08 12:08:37 -07:00
walter
c0a1ce5ea5 Removed debug code. 2016-09-08 11:25:05 -07:00
walter
4ddb059346 switched to handlebar template for passing the server's owasp config down to the client.
reverted some of the other changes (regarding the http request).
2016-09-08 11:17:41 -07:00
Mikael Korpela
25c8a6044c fix(tests): Clean out .send() from tests (#1489)
Clean out commented `.send()` from user CRUD test.
2016-09-08 14:45:33 +03:00
walter
d896d07d8b Added configuration for owasp. Synchronize client owap configs with the server configs.
Also added a time indicator on failed login attempts to give the user feedback on subsequent failed login attempts.
2016-09-07 19:16:11 -07:00
hyperreality
c2cfc388bf feat(ui): improved social login buttons UI (#1471) 2016-09-04 01:29:43 +03:00
Liran Tal
cf246babd1 feat(config): adds a generic DOMAIN configuration environment (#1469)
Generic DOMAI configuration environment variable, useful for setting links to an app
in reset email templates, and other cases.

Fixes #871 and #847
2016-09-01 22:37:43 +03:00
Daron Jones
54ae7dc564 feat(users): prevent route leaking access token (#1417)
The test for authentication use a route /api/users/me. This should probably be upgraded to use
a proper passport mock.

In the meanwhile this should make the returned user object safer - using code from core.

Fixes n/a
2016-08-31 22:50:23 +03:00
Mikael Korpela
c35713d352 fix(core): Fixes issues with tests and Node v6 (#1458)
Fixes issues with Mocha tests and Node v6.

Related to #1455
2016-08-28 14:30:27 +03:00
shanavas
730cca76af fix(users): don't update secure profile fields (#1421)
* Fix(users): Don't update secure profile fields

Avoid updating secure fields as password, salt ..etc through
user profile update.

Fixes #1420

* Refactor variable name
2016-08-27 09:45:06 +03:00
Liran Tal
2f394ecb97 fix(ui): update social login design
* Update social login design 

- Responsive images
- Mobile layout as well

* changes according to hyperreality advices
2016-08-26 21:27:58 +03:00
Mikael Korpela
96aec09488 fix(user): specify a digest with crypto.pbkdf2Sync (#1429)
Fixes Node v6 crypto deprecation warning
 “crypto.pbkdf2 without specifying a digest is deprecated. Please specify a digest”
2016-08-26 10:13:51 +03:00
aanev
234f0c6850 fix(user): fix changeProfilePicture to overwrite existing files
* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

Fixes #1415

* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

* log file errors to console

Fixes #1415

* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

* log file errors to console

* update error handler module to handle file upload errors

Fixes #1415

* fix(user): fix changeProfilePicture

* use promises to simplify callbacks

* use fs.unlink to delete old picture once the profile is updated

* log file errors to console

* update error handler module to handle file upload errors

Fixes #1415
2016-08-26 10:10:02 +03:00
hyperreality
246c5d953c feat(profile): Profile picture cropping, mobile uploading and progress bar (#1443)
* Add ng-file-upload and picture cropping

* Update bower.json

Remove bower dependency for angular-file-upload
2016-08-26 09:56:56 +03:00
Liran Tal
c95bd7d1cb fix(core): fix ESLint console warnings, Twitter redirect, and and scope usage (#1388)
* Use validator.js instead of regexp for validations in User Schema.

* Disables "Unexpected console statement  no-console" warnings

* Fixes redirection to wrong URL after login with social networks.

* Use ViewModel vm instead of $scope in manage social accounts controller.

* preserving the option to redirect to a specific URL as done in saveOAuthUserProfile() (thanks to @OneOfTheWorld for pointing out)
2016-07-07 01:24:23 +03:00
Michael Leanos
b795ddc7cd feat(users): Edit Profile client controller tests (#1329)
Adds client-side tests for the Users Edit Profile client controller.

1) should have user context
2) should update the user profile
3) should set vm.error if error

Related #1283
2016-06-25 13:52:22 -07:00
Jonathan Trowbridge
2ad422ca9b fix(users): fix for users.profile.server.controller.js security (#1338)
* Fix for users.profile.server.controller.js security (#1338)

Fixes an issue where if req.body._id was not set to the current user it
could potentially log the current user in as another user.

Don't use req.body._id when editing user

Prevents a user from being logged in as another if edit user form _id is
not their own.

Fixes #1338
2016-06-18 18:12:08 +03:00
Trevor Jennings
5137214972 fix(users): Incorrect UsersService injection (#1283)
* fix bug in edit profile controller.

* fix(users): Incorrect UsersService injection
2016-04-29 14:20:03 -07:00
Michael Leanos
4906611ccc fix(users): GitHub strategy missing email (#1250)
Fixes an issue with an empty/missing/null Email coming from GitHub's
OAuth call response.

Also, introduces the `sparse` index option on the User model's Email
field. This will ensure that we can have multiple User documents without
the Email field.

Adds a server-side User model test for the sparse index setting on the
email field.

Confirms that User documents without the email field are not indexed,
illustrating the sparse option on the schema's email field works
properly.

Added the dropdb task to the Gulp test:client & test:server tasks, to
ensure we have a clean database & that any indexes are rebuilt; this
will ensure any Schema changes (in this case the email index is rebuilt using
the sparse index option) are reflected when the database is started again.

Added a UPGRADE.md for tracking important upgrade information for our
user's to be aware of, when we introduce potentially breaking changes.

Included an explanation of the Sparse index being added, and how to apply it
to an existing MEANJS application's database.

Adds a script for dropping the `email` field's index from the User
collection.

Related #1145
2016-04-29 14:13:46 -07:00
Ryan Hutchison
b2462ec86c feat(core): Modify core module to implement style guidelines.
Update the core module to implement the style guidelines.
Reduce size of init.js - moved filter logic out to it's own config.
Rename Menus to menuService
2016-03-23 15:41:57 -04:00
Liran Tal
80226a2b24 fix(client): lint issues for confirm() messages not referencing the window object 2016-03-17 22:27:53 +02: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
Michael Leanos
4e9ad81ad2 Merge pull request #1246 from QiyuLi/fix/supoort_mongo_3.2
fix(core): Support WiredTiger engine errmsg format in MongoDB 3.2
2016-03-14 12:19:59 -07:00
Michael Leanos
4c89ce7e2d Merge pull request #1208 from itelo/users-styleguide
feat(users): Modify users module to implement style guidelines.
2016-03-14 11:46:41 -07:00
mleanos
b00498629c fix(core): Remove trailing slash from routes
Adds an angular $urlRouterProvider service Rule to the Core module
configuration, that removes any trailing slashes in the URL for all routes.

The Rule is defined in the core routes configuration. Thus, in order for
this to work on all routes in the application, we have to inject the Core
module into each client module, as a dependecy in the client.module
configuration. Otherwise, we'd have to define the Rule in each module's route
configuration individually.

Adds missing client-side route configuration tests.

Tests demonstrate that the various route configurations can handle a trailing
slash in the URL, and gets resolved to the correct client route.

Fixes #1075
2016-03-06 20:56:29 -08:00
IteloFilho
173b702f6a feat(users): Modify users module to implement style guidelines. 2016-03-06 12:21:51 -03:00