01:55:35  * rfengquit (Quit: rfeng)
03:06:32  * rfengjoined
03:37:26  * rfengquit (Quit: rfeng)
05:53:15  * rfengjoined
05:53:16  * rfengquit (Remote host closed the connection)
05:53:34  * rfengjoined
07:02:35  * fabienfjoined
08:41:24  * rfengquit (Quit: rfeng)
14:53:12  * rfengjoined
15:41:29  * vlcnjoined
15:41:38  * vlcnpart ("Textual IRC Client: www.textualapp.com")
15:46:58  * rmgjoined
16:13:28  * spl_joined
16:33:09  * spl_quit (Quit: leaving)
16:45:42  * spl_joined
16:45:57  <spl_>hi
16:46:04  <rfeng>hi
16:46:46  <spl_>I just discovered loopback this morning and it looks very nice... however, i have a newbie question
16:48:10  <spl_>i want to restrict the api access via acl to the owner of my model. I added a belongsTo relationship to the user model. I add the userId to my model in my angular save()-action...
16:48:42  <spl_>so, is there any magic, that tells loopback, that my authenticated request belongs to a given model-entry?
16:49:08  <spl_>seems, that the role $owner has no effect for me
16:59:45  <rfeng>what request do you make?
17:00:24  <rfeng>there is an example app at https://github.com/strongloop/loopback-example-access-control
17:01:05  <spl_>first i deny all for everybody, then allow all for $owner on GET /models
17:01:17  <spl_>i'll check the example
17:01:44  <rfeng>GET /models won’t apply the $owner as the result is more than one
17:02:06  <spl_>ah!
17:02:20  <spl_>thx for pointing that out!
17:02:25  <rfeng>There is an open issue to enable that
17:02:37  <rfeng>which will require post processing of the results
17:02:45  * rmgquit (Remote host closed the connection)
17:02:51  <rfeng>You can do that using custom code in afterRemote hooks too
17:03:19  * rmgjoined
17:03:29  <spl_>I have access to the current_user in the afterRemote hook?
17:04:03  <rfeng>yes, the req object should have access to the accessToken which contains the userId
17:05:30  <spl_>okay, i'll read the docs how to do that (pretty new to node.js)
17:05:35  <spl_>thank you so far!
17:07:48  * rmgquit (Ping timeout: 250 seconds)
18:07:34  * spl_quit (Quit: leaving)
19:07:02  * rfengquit (Quit: rfeng)
19:48:30  * rfengjoined
21:05:42  * rmgjoined
21:12:34  * rmgquit (Ping timeout: 264 seconds)
21:25:24  * rfengquit (Quit: rfeng)
22:39:26  * fabienfquit (Quit: fabienf)
22:41:54  * rfengjoined