Raymond Feng
921e35954d
Rename the method so that it won't conflict with Model.checkAccess
...
See https://github.com/strongloop/loopback/issues/239
2014-04-21 11:13:03 -07:00
Ritchie Martori
83e74ab414
Merge
2014-04-16 07:39:13 -07:00
Ritchie Martori
b660f8a59e
Add replication e2e tests
2014-04-16 07:33:17 -07:00
Ritchie Martori
e86a00de69
Merge branch master
2014-04-15 12:53:00 -07:00
Ritchie Martori
940e11125d
Fix save implementation for remoting connector
2014-04-14 14:17:56 -07:00
Ritchie Martori
7c0a470d64
Add basic Remote connector e2e test
2014-04-14 12:25:41 -07:00
Ritchie Martori
5298834c68
Merge branch 'master' into feature/remoting-connector
2014-04-14 11:01:20 -07:00
Ritchie Martori
63ad8f69ae
Add test for remoting nested hidden properties
2014-04-11 11:43:37 -07:00
Raymond Feng
8f50c9dede
Add an assertion to the returned store object
2014-04-04 08:26:57 -07:00
Raymond Feng
cdbf45c53a
Add an integration test for belongsTo remoting
2014-04-03 20:46:30 -07:00
Ritchie Martori
5f81fad921
Merge pull request #217 from strongloop/feature/hidden-properties
...
Feature/hidden properties
2014-03-31 12:04:49 -07:00
Ritchie Martori
4c185e5453
Support host / port in Remote connector
2014-03-27 14:47:30 -07:00
Miroslav Bajtoš
b1679803d9
test: add hasAndBelongsToMany integration test
...
* it allows to find related object via URL scope
GET /api/categories/{cat-id}/products
* it allows to find related objects via where filter
GET /api/products?filter[where][categoryId]={cat-id}
(skipped for now)
* it includes requested related models in `find`
GET /api/categories/findOne
?filter[where][id]=CAT-ID&filter[include]=products
* it includes requested related models in `findById`
GET /api/categories/{cat-id}?include=products
(skipped for now)
2014-03-25 19:38:15 +01:00
Ritchie Martori
5b50a99eb3
Add hidden property support to models
2014-03-21 12:53:04 -07:00
Ritchie Martori
c521b3c386
Allow app.model() to accept a DataSource instance
2014-03-21 12:18:00 -07:00
Ritchie Martori
de5d0b8949
Make verifications url safe
2014-03-21 12:02:11 -07:00
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
Miroslav Bajtoš
1aaf6eed35
Add test for request pausing during authentication
2014-03-18 08:43:24 +01: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
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
Miroslav Bajtoš
fe6ac0bebf
Merge pull request #195 from globocom/fix-clear-handler-cache-test
...
Rewrites test for clear handler cache.
2014-02-21 18:51:55 +01:00
Raymond Feng
4a0c564c68
Merge pull request #196 from strongloop/feature/remoting-options
...
Allows options to be passed to strong-remoting
2014-02-21 09:10:37 -08:00
Raymond Feng
1717729efc
Merge pull request #186 from albertoleal/RemoveUnnecessaryLines
...
Remove unnecessary lines
2014-02-21 09:06:11 -08:00
Guilherme Cirne
f43273e5d7
Rewrite test for clear handler cache.
2014-02-20 14:39:57 -03:00
Raymond Feng
37646fa008
Allows options to be passed to strong-remoting
2014-02-19 15:14:31 -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
Ritchie Martori
edd16b9ce8
Merge pull request #193 from globocom/clear-handler-cache2
...
Clear handler cache
2014-02-18 14:24:23 -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
Ritchie Martori
a313d1d140
Remove outdated test readme
2014-02-18 10:37:43 -08:00
Alberto Leal
6eecaa78a3
Remove unnecessary lines
2014-02-17 14:05:04 -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
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
Ritchie Martori
0bf7af104d
fixup! rename Change.track => rectifyModelChanges
2014-02-05 15:27:58 -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
Miroslav Bajtoš
4a076f13fd
Fix incorrect usage of `app` in app.test.js
...
The `beforeEach` hook was using a local `var app`, the test was
accessing global `app` created by `test/support.js`.
2014-02-04 20:27:14 +01:00
Raymond Feng
592f3f9278
Make sure the configured ACL submodel is used
2014-02-03 16:00:01 -08:00
Ritchie Martori
13f67385d0
Add model tests
2014-01-30 14:20:34 -08:00
Ritchie Martori
cc49d675ce
Add Change model
2014-01-30 14:20:33 -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
Ritchie Martori
a0e595dce8
Add model tests
2014-01-28 14:46:16 -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
Ritchie Martori
4be3395298
Add Change model
2014-01-26 13:20:19 -08:00
Raymond Feng
f08b9427ab
Add a test for autoAttach
2014-01-23 15:27:31 -08:00
Raymond Feng
bcc7e68e0e
Add lookback.getModelByType() and use it resolve model deps
2014-01-23 14:39:27 -08:00
Ritchie Martori
86a85291ac
Fix user test race condition
2014-01-23 14:39:15 -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
a6ff22c9c1
Make sure defaultPermission is checked
2014-01-16 15:05:10 -08:00
Raymond Feng
c8eb5d9170
Make sure methods are called in the context of the calling class
2014-01-14 15:34:44 -08:00
Miroslav Bajtoš
1f80164e69
Merge pull request #135 from strongloop/feature/speed-up-user-passwords
...
Speed up tests accessing User.password
2014-01-13 22:04:41 -08:00
Miroslav Bajtoš
809411c103
Speed up tests accessing User.password
...
Decrease User.settings.saltWorkFactor in order to speed up unit-tests.
2014-01-13 20:05:22 +01:00
Miroslav Bajtoš
ed81bdb6b8
Implement app.installMiddleware
...
The implementation is mostly a copy of
loopback-workspace/templates/app.js
2014-01-13 17:26:24 +01:00
Miroslav Bajtoš
914ac2dcc9
Implement `app.listen`
...
The method starts a http server on the host & port configured
in the app config.
2014-01-13 09:12:54 +01:00
Miroslav Bajtoš
92896a441c
Add app.restApiRoot setting
...
Allow loopback users to configure API root via config file, instead of
editing app.js generated by loopback-workspace.
Allow loopback plugins to discover the path where the REST adapter is
mounted.
2014-01-07 16:05:48 +01:00
Miroslav Bajtoš
78f514a003
Add ValidationError to loopback exports.
...
Simplify the construction of validation errors in user-land code:
var error = new loopback.ValidationError(invalidModel);
2014-01-02 10:35:17 +01:00
Ritchie Martori
7b826e7c9e
Add e2e tests for relations
2013-12-20 19:15:23 -08:00
Ritchie Martori
981bdd4c81
app.boot() now loads the "boot" directory
2013-12-18 21:41:41 -08:00
Ritchie Martori
16b790a93a
Merge pull request #102 from strongloop/fix/user
...
Various Fixes and Behavioral Changes to the User Model
2013-12-18 21:34:30 -08:00
Raymond Feng
40cd71c4c6
Clean up the test case
2013-12-18 12:28:58 -08:00
Raymond Feng
598b1e6b61
Reformat the code using 2 space identation
2013-12-18 11:49:09 -08:00
Raymond Feng
95ad3e8c04
Allow cert/key data to be shared by push/feedback
2013-12-18 10:58:34 -08:00
Ritchie Martori
9f2651578b
fixup - Include accessToken in user logout tests
2013-12-17 21:34:30 -08:00
Ritchie Martori
98ed38302a
Logout now automatically pulls the accessToken from the request
2013-12-17 21:22:05 -08:00
Ritchie Martori
939df463fe
Fix tests depending on old behavior of default User ACLs
2013-12-17 21:10:05 -08:00
Ritchie Martori
ea7c9216d7
App config settings are now available from app.get()
2013-12-11 19:31:16 -08:00
Raymond Feng
97dc0aa441
Refactor to the code use wrapper classes
...
Add AccessContext, Principal, and AccessRequest
Add debug information
2013-12-11 16:03:48 -08:00
Raymond Feng
178674ec9a
Enhance getRoles() to support smart roles
2013-12-11 09:06:21 -08:00
Raymond Feng
82eeaeee6b
Fix the algorithm for Role.isInRole and ACL.checkAccess
2013-12-10 23:33:57 -08:00
Ritchie Martori
dfcb43e613
Allow requests without auth tokens
2013-12-10 15:57:55 -08:00
Ritchie Martori
e7cc30ee03
Fix base class not being actual base class
2013-12-09 17:11:01 -08:00
Raymond Feng
7f51c28539
Fix the ACL resolution against rules by matching score
2013-12-09 15:26:53 -08:00
Ritchie Martori
af2b8dd4ff
Merge feature/password-reset
2013-12-06 17:35:14 -08:00
Ritchie Martori
216fee3015
Add access type checking
2013-12-06 17:04:47 -08:00
Ritchie
68ef03e944
SLA-725 support PORT and HOST environment for PaaS support
2013-12-05 20:00:09 -08:00
Raymond Feng
23add99f12
Fix the test assertion as the error message is changed.
2013-12-04 14:41:25 -08:00
Ritchie Martori
2f9403016c
Initial auth implementation
2013-11-22 12:26:59 -08:00
Miroslav Bajtos
cf541cb828
Add test for findById returning 404
...
The test verifies the remoting configuration of
loopback-datasource-juggler, ensuring that
`DataAccessObject.findById()` has `rest.before` handler
correctly set up.
2013-11-21 16:23:01 +01:00
Ritchie Martori
e92c46a4e4
Add password reset
2013-11-20 14:20:47 -08:00
Raymond Feng
344c74297c
Add unauthenticated role
2013-11-20 13:43:02 -08:00
Raymond Feng
bee8a3b022
Add checkAccess for subject and token
2013-11-20 13:43:01 -08:00
Raymond Feng
2c7c5fc7ec
Start to support smart roles such as owner
2013-11-20 13:43:01 -08:00
Ritchie Martori
3753c15b71
Merge pull request #71 from strongloop/feature/status-middleware
...
Add status middleware
2013-11-19 13:15:57 -08:00
Ritchie Martori
fd7dd7e4a2
Add status middleware
2013-11-19 12:54:30 -08:00
Ritchie Martori
178e5dab30
Remove .attachTo() from tests
2013-11-19 11:02:43 -08:00
Ritchie Martori
cb39ae7adb
Debugging odd defineFK behavior
2013-11-19 10:29:02 -08:00
Ritchie Martori
da0545bed6
Initial auto wiring for model dataSources
2013-11-18 16:13:40 -08:00
Raymond Feng
8381b05da1
Allows LDL level ACLs
2013-11-15 09:41:26 -08:00
Raymond Feng
9bc762c09c
Update dependencies
2013-11-14 21:19:57 -08:00
Raymond Feng
8e679d0927
Fix the permission resolution
2013-11-14 21:19:57 -08:00
Raymond Feng
94f12d0fce
Fix the permission check
2013-11-14 21:19:57 -08:00
Raymond Feng
660ef89755
Merge ScopeACL into ACL
2013-11-14 21:19:56 -08:00
Raymond Feng
0430cd2ae3
Add tests for isInRole and getRoles
2013-11-14 21:19:56 -08:00
Raymond Feng
c3a1a85159
Add constants and more tests
2013-11-14 21:19:56 -08:00
Raymond Feng
48a0242711
Define the models/relations for ACL
2013-11-14 21:19:56 -08:00
Raymond Feng
67b934357b
Start to build the ACL models
2013-11-14 21:19:56 -08:00
Ritchie Martori
1de2a40e88
Update AccessToken and User relationship
...
- Add created default
- Default TTLs for user login access tokens
- Break out User / AccessToken relationship
2013-11-14 19:41:29 -08:00
Ritchie Martori
1bb95607b9
Update session / token documentation
2013-11-14 15:42:37 -08:00