Log message #4017578

# At Username Text
# Apr 19th 2017, 12:12 inoas pastebin sucks
# Apr 19th 2017, 12:12 hmic i can state whatever i like to in my licence
# Apr 19th 2017, 12:12 hmic no, the full project that uses it!
# Apr 19th 2017, 12:12 inoas you want the full appcontroller ;)?
# Apr 19th 2017, 12:12 Junior https://pastebin.com/NSP1mPZs
# Apr 19th 2017, 12:12 Junior here it is
# Apr 19th 2017, 12:12 inoas lol
# Apr 19th 2017, 12:12 hmic if its in your code, you should! i can force you to give it to me now, by adding my licence.txt
# Apr 19th 2017, 12:12 inoas its closed source at the moment - not my choice
# Apr 19th 2017, 12:11 hmic better dont state anything, especially ownership
# Apr 19th 2017, 12:11 inoas who cares
# Apr 19th 2017, 12:11 inoas its a small snipplet on a gist
# Apr 19th 2017, 12:10 hmic inoas, its certainly ok to say: MIT, check licence.txt for details. but not mentioning anything sounds like a bad idea to me :p i could now make up a licence that forces everything that uses this code to adhere to it
# Apr 19th 2017, 12:09 inoas updated for you hmic ;p
# Apr 19th 2017, 12:08 inoas hmic: lol
# Apr 19th 2017, 12:08 hmic inoas, you did not provide a licence.txt
# Apr 19th 2017, 12:08 inoas hmic how would that be done with middleware then? I mean the passing down to the model
# Apr 19th 2017, 12:07 inoas maybe you need something like this $this->_userModel = 'FlexiSystem.Users'; // Muffin/Footprint .. .if you users live ina plugin
# Apr 19th 2017, 12:07 hmic all that crap goes away with middlewares, finally
# Apr 19th 2017, 12:07 Junior allow me 2 minutes to paste
# Apr 19th 2017, 12:07 Junior inoas, yes , i have that
# Apr 19th 2017, 12:06 inoas in my case
# Apr 19th 2017, 12:06 inoas and well $this->addBehavior('Muffin/Footprint.Footprint', ['events' => ['Model.beforeSave' => ['user_id' => 'always']]]);
# Apr 19th 2017, 12:06 hmic obinoob, if you have a baked controller, just use the view function but pass the Auth->user('id') instead of $id.
# Apr 19th 2017, 12:06 inoas https://gist.github.com/inoas/6152e91774ef3f303b6f4b567d726b19
# Apr 19th 2017, 12:06 inoas Junior: straight from my project
# Apr 19th 2017, 12:05 obinoob ionas thank you
# Apr 19th 2017, 12:05 Junior inside appController
# Apr 19th 2017, 12:05 inoas muffin can do that for you (I think)
# Apr 19th 2017, 12:05 Junior and use FootprintAwareTrait;
# Apr 19th 2017, 12:05 inoas basically all you pass down is the user id
# Apr 19th 2017, 12:05 Junior inoas i have added use Muffin\Footprint\Auth\FootprintAwareTrait; //https://github.com/UseMuffin/Footprint
# Apr 19th 2017, 12:04 inoas obinoob: yeah
# Apr 19th 2017, 12:03 Junior inoas, i had foreign keys, i had to drop them to see what happens :)
# Apr 19th 2017, 12:02 obinoob ionas the finder would go in UserTable class I guess
# Apr 19th 2017, 12:00 obinoob ionas that sound nice
# Apr 19th 2017, 11:59 inoas you can build a finder that is only for the user himself, and pass down the user id from auth component when calling it from your controller
# Apr 19th 2017, 11:58 inoas ;p
# Apr 19th 2017, 11:58 inoas middleware... urgh
# Apr 19th 2017, 11:58 inoas the check for what he can do can either be controller or model domain
# Apr 19th 2017, 11:58 inoas obinoob: IMHO depends. The check for which user is operating clearly is controller space