Commit Graph

47 Commits

Author SHA1 Message Date
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
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
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
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
Ilan Biala
0323696eaf Format code according to ESLint rules 2015-10-16 20:52:31 -04: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
mleanos
65c6d1ffe0 Socket IO client enhancement with connect() method
Updated the Socket client service, with a connect() method. Moved state
redirect out of from Socket service.  Added the Authentication.user
check to the Chat client controller, and added a check to make sure the
Socket client service is connected to the server; if not, then connect
using the new connect() method.

Had to do a hard reset from 0.4.0 due to conflicts when merging and
pushing to remote.
2015-07-25 00:36:01 -07:00
Ryan Hutchison
60660204ac Admin module base & user admin implementation.
update displayName

implements #700 (client-side role security) on angular routes.
2015-07-24 20:03:35 -04:00
Andrew Throener
1b54d35305 Final Clean Up after code review 2015-07-24 17:06:55 -05:00
Andrew Throener
03a4042a33 Updated routes and a logic fix 2015-07-24 16:43:46 -05:00
Andrew Throener
fb71619e0c Refactor 2015-07-24 15:37:26 -05:00
Igor Freire
e21805f20a Prepare for role-based access control of states 2015-07-24 16:59:13 -03:00
Igor Freire
9fc88e6e5b Filter states for which login is required during state change
A state parameter was added for the routes that require user authentication. Now, everytime a statechange occurs, the destination state is checked and user is redirected to signin page if necessary. Note the state parameter is added within `data`, so that nested states can inherent its value.
2015-07-24 16:17:14 -03:00
Liran Tal
00a4c0603a Merge pull request #566 from simison/error-404-pages
#501 Handle 404 errors at Express backend and at Angular frontend
2015-07-20 22:25:33 +03:00
Ryan Hutchison
9ca71c8cde remove href attribute. 2015-07-07 08:18:47 -04:00
Ryan Hutchison
73b5fa3df0 Revert "load bootstrap (doh)"
This reverts commit 7d8cea159b.
2015-07-07 08:18:38 -04:00
Ryan Hutchison
30c916030e setup dropdown menu 2015-07-05 17:51:04 -04:00
Liran Tal
d5b22e35c4 addressing missing newlines and node 0.12 version for travis-ci 2015-07-05 01:12:54 +03:00
Liran Tal
834bfd6cf8 removing left-overs of merge diff from 0.4 to master 2015-07-03 07:51:08 +03:00
Liran Tal
67e96a4f22 0.4.0 branch merged into master 2015-07-02 12:08:09 +03:00
cdriscol
2a3516e2a6 Removing target on signin and signup anchors to prevent a complete page reload when changing to those states. 2015-06-03 21:44:40 -06:00
Mikael Korpela
ba1a4475e9 #501 Handle 404 errors at Express backend at at Angular frontend
- `/{api|modules|lib}/*` returns error page when path doesn’t exist
(from Express).
- `/*` always returns index (from Express), but if `$state` doesn’t
exist, Angular redirects to `/not-found` (no 404 status in that case
though!)
- If `Accept: application/json` header is present without `Accept:
text/html`, return error as json. Hence looking at non existing /api/*
paths with browser would show html error, but querying them with script
would return json.
- Slightly prettier 404 error

Test:
```bash
curl http://localhost:3000/api/notfound -4 -H "Accept: application/json"
```
=> json error.

```bash
curl http://localhost:3000/api/notfound -4 -H "Accept:
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0
.8"
```
=> html error (imitates Chrome’s Accept header).

Starting point was @dotch’s PL: https://github.com/meanjs/mean/pull/503

And `req.accepts()` idea came from http://stackoverflow.com/a/9802006
2015-05-18 17:38:30 +03: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
Christian Berendt
4879a8ea2a Remove executable bit when not necessary
The executable bit is set for a lot of files where it is not necessary
to have the executable bit set. This PR removes the executable bit from
those files.
2015-02-16 14:19:56 +01:00
Amos Haviv
ab81d61bd3 New 0.4 version 2014-11-10 23:12:33 +02:00