Commit Graph

229 Commits

Author SHA1 Message Date
Raymond Feng 328a72ac91 Improve the ACL matching algorithm
See https://github.com/strongloop/loopback-example-access-control/issues/8
2014-03-19 15:09:20 -07:00
Raymond Feng 32a9131004 Pause the req before checking access
See https://github.com/strongloop/loopback-storage-service/issues/7
2014-03-17 14:40:05 -07:00
Raymond Feng f031e79392 Remove the generated flag as the id is set by the before hook 2014-03-17 10:01:29 -07:00
crandmck c80b334130 Improvements to JSDoc comments 2014-03-14 10:28:31 -07:00
crandmck 9fb3f3313a Fixes to JSDoc for API docs 2014-03-13 17:25:21 -07:00
Raymond Feng 533daf4040 Remove oauth2 models as they will be packaged in a separate module 2014-03-11 22:37:54 -07:00
Ritchie Martori 57ff242308 Minor doc fix 2014-03-10 18:05:44 -07:00
Raymond Feng 89aa3595f5 Set the correct status code for User.login
See https://github.com/strongloop/loopback/issues/118
2014-02-28 13:19:52 -08:00
Ritchie Martori 4e437586ed Merge pull request #192 from strongloop/fix/port-zero
Remove coercion from port check
2014-02-21 10:08:27 -08:00
Raymond Feng 37646fa008 Allows options to be passed to strong-remoting 2014-02-19 15:14:31 -08:00
Ryan Graham 088c2e2296 Merge fixup 2014-02-19 14:11:16 -08:00
Ritchie Martori 138821cf8b Merge package.json and lib/loopback.js 2014-02-19 11:44:44 -08:00
Ritchie Martori 500703e1fb Remove coercion from port check 2014-02-18 16:54:40 -08:00
Guilherme Cirne b466bb96c8 The simplest possible solution for clearing the handler cache when registering a model. 2014-02-18 17:40:35 -03:00
Raymond Feng 46b579dc4a Make sure User/AccessToken relations are set up by default
User.login assumes the relation User.accessTokens exists
2014-02-14 10:31:30 -08:00
Ritchie Martori e7f64a3abf Add karma for running browser tests 2014-02-12 10:17:02 -08:00
Aurelien Chivot c216ba03c1 Documentation (generated) fix 2014-02-11 19:14:04 +01:00
Raymond Feng 618b563c6e Use hex encoding for application ids/keys
base64 encoded ids/keys are not friendly for urls
2014-02-07 11:14:01 -08:00
Miroslav Bajtoš 38f4748021 Add app.isAuthEnabled.
The flag is set by `app.enableAuth` and can be used to detect
whether the access control is enabled.
2014-02-05 18:46:22 +01:00
Miroslav Bajtoš b13ff35697 Make app.models unique per app instance
Remove a source of confusion in unit-tests.
2014-02-04 20:28:19 +01:00
Raymond Feng 592f3f9278 Make sure the configured ACL submodel is used 2014-02-03 16:00:01 -08:00
Miroslav Bajtoš c36e20587e Merge pull request #163 from strongloop/feature/include-user-in-login-result
Include user in login result
2014-01-30 10:24:14 -08:00
Raymond Feng c711b99b8a Merge pull request #154 from strongloop/feature/debug-login-error
Add debug information for user.login
2014-01-30 10:13:26 -08:00
Miroslav Bajtoš d6f0b5f5a6 Add `include=user` param to `User.login`
Allow LB clients to get details of the currently logged-in user
as part of the login response.

Improve method's `description` to mention this new option.
2014-01-30 18:09:54 +01:00
Miroslav Bajtoš 03cb2f0556 Describe `access_token` param of `User.logout`
Add an explicit note that clients are not supposed to send the
`access_token` parameter, since it is extracted from request
headers.
2014-01-30 18:09:54 +01:00
Raymond Feng 57796a41cd Remove the generated flag for access token id
The generated flag is used to indicate if the id is automatically generated
by the backend store. If it's set, the data type will be updated when the
model is attached to a datasource.

The AccessToken model defines a string id, which is set in the beforeCreate
hook. So it's client provided id.
2014-01-30 09:02:12 -08:00
Raymond Feng 938cafeb77 Remove message prefix as debug will print it 2014-01-27 14:47:48 -08:00
Raymond Feng c35f762d4e Add debug information for user.login 2014-01-27 14:31:38 -08:00
Miroslav Bajtoš 20766e251a Add loopback.compat to simplify upgrade to 1.6
Add a compatibility layer that allows applications based on LB pre-v1.6
to work with 1.6 versions with a minimum amount of changes required.

New flag(s):
  compat.usePluralNamesForRemoting
2014-01-27 10:29:57 +01:00
Miroslav Bajtoš 8bb8861ba1 Register exported models using singular names
Remove the inconsistency between model names used by LoopBack app and
datasource-juggler (modelName, e.g. User) and the name used by
strong-remoting (pluralModelName, e.g. Users).

This way the class name in the strong-remoting metadata can be used
by client-code generators. Before this change, the generators would
produce method names like `Users.login`.
2014-01-27 10:29:57 +01:00
Miroslav Bajtoš 54bff35fef User: use User.http.path
Use the new property introduced by a recent change in
loopback-datasource-juggler instead of building the URL
manually from pluralModelName.
2014-01-27 10:29:57 +01:00
Raymond Feng 5586c54c49 Fix the Role ref to RoleMapping 2014-01-23 15:04:48 -08:00
Raymond Feng 224b500c3a Fix the Scope reference to models 2014-01-23 14:46:02 -08:00
Raymond Feng bb389ce209 Lookup the email model 2014-01-23 14:40:27 -08:00
Raymond Feng bcc7e68e0e Add lookback.getModelByType() and use it resolve model deps 2014-01-23 14:39:27 -08:00
Ritchie Martori a43d6004c1 Fix race condition where MyEmail model was not attached to the correct dataSource in tests 2014-01-23 14:25:54 -08:00
Raymond Feng d6a4230aed Fix the method args 2014-01-21 16:41:48 -08:00
Raymond Feng a5242a3b77 Fix the typo for the method name 2014-01-21 16:35:28 -08:00
Raymond Feng 8a114c635f Prevent autoAttach from overriding existing data source 2014-01-20 14:32:47 -08:00
Raymond Feng 5a6155e08e Clean up loopback.js doc and add it to docs.json 2014-01-17 10:40:41 -08:00
Raymond Feng 32bdce53ee Fix the jsdoc for loopback.getModel() 2014-01-17 10:23:59 -08:00
Raymond Feng a6ff22c9c1 Make sure defaultPermission is checked 2014-01-16 15:05:10 -08:00
Raymond Feng 7212ebe805 Remove the dangling require 2014-01-16 09:12:52 -08:00
Raymond Feng d8647bb3c1 Make ACL model subclassing friendly 2014-01-16 08:50:50 -08:00
Miroslav Bajtoš e6cdeb5cd4 Improve jsdox documentation of app object
Remove docs/api-app.md and docs/api.md, as they are no longer referenced
from docs.json.

Add few missing bits from docs/api-app.md to lib/application.js
comments.
2014-01-15 08:44:49 +01:00
Raymond Feng c8eb5d9170 Make sure methods are called in the context of the calling class 2014-01-14 15:34:44 -08:00
Ritchie Martori 9fc8e197ee Start to move md to jsdoc 2014-01-14 10:03:47 -08:00
Miroslav Bajtoš 8573d01c16 Replace `on` with `once` in middleware examples
Fix the jsdox for `app.installMiddleware` to use `app.once` for
listening on 'middleware:*' events.

The previous doc version using `on` was a sort of preliminary
pessimisation, becase the event handlers would stay in the heap
for the whole life-time of the app, even though they won't be called
more than once.
2014-01-14 08:07:47 +01:00
Miroslav Bajtoš 57813cef56 Merge pull request #133 from strongloop/feature/app-install-middleware
Implement app.installMiddleware
2014-01-13 21:58:11 -08:00
Ritchie Martori 9668692406 Merge pull request #136 from strongloop/fix/mail-transports
Fix incorrect transports
2014-01-13 20:03:25 -08:00