Log message #4159989

# At Username Text
# Jul 18th 2018, 12:17 flavius File uploaded https://cakesf.slack.com/files/U75U0UMR9/FBSKFMC8J/image.png / https://slack-files.com/T053DPNCM-FBSKFMC8J-186151c8a1
# Jul 18th 2018, 12:16 flavius it makes no sense to save the rank, you should save the points for each player
# Jul 18th 2018, 12:15 turkles @flavius There are events which a random number of people can enter, which rank players, and I only have to change those where someone has ended up above someone with a higher rank. It's a bit arbitrary like a tennis ladder.
# Jul 18th 2018, 12:13 info356 I need some help with events.. https://stackoverflow.com/questions/48372487/cakephp-3-dynamic-database-connection Where should i put: \Cake\Event\EventManager::instance()->on( 'Connection.aliased',
# Jul 18th 2018, 12:08 flavius why not save the points and do the rank on the fly?
# Jul 18th 2018, 12:07 turkles Hi all, I have an array [1 => [name=mark, rank=100],2 => [name=dave, rank=99]...] and during re-ranking I want to reduce all members with a current rank between x and y, what is the best way of doing this?
# Jul 18th 2018, 11:30 abdualelah.mdy @neon1024 thanks for your help
# Jul 18th 2018, 11:30 neon1024 Well, just the controllers in most cases, if you’re using conventions
# Jul 18th 2018, 11:30 neon1024 Yep
# Jul 18th 2018, 11:29 abdualelah.mdy @neon then i have to connect all pages by myself right ?
# Jul 18th 2018, 11:27 neon1024 I would recommend removing the fallback routes, to prevent duplicate content for seo purposes
# Jul 18th 2018, 11:27 neon1024 https://github.com/cakephp/app/blob/master/config/routes.php#L62-L78
# Jul 18th 2018, 11:25 neon1024 @abdualelah.mdy You can’t really. The default routes are generated by the Fallback Routing, called at the end of your routes file
# Jul 18th 2018, 11:24 abdualelah.mdy How can I block default route that is generated by CakePHP ( note : i don't want to block all of them )
# Jul 18th 2018, 11:24 neon1024 In my experience, the snippet in the book works for almost every use-case
# Jul 18th 2018, 11:23 slackebot immediately to save some processing.
# Jul 18th 2018, 11:23 neon1024 Well @okelet do bear in mind that Authentication and Authorisation are different. Here you’re talking about Authorisation, which as you say, will be checked on each Controller action, if you’ve set Auth to Controller. Which will then call your `isAuthorized()` method. If the session expires, a null will be passed. I copied the book and only check for what I need. I guess you could “go home early” and if the user is null return false
# Jul 18th 2018, 11:22 okelet thanks @neon1024 i was supposing that when I enable auth, i always force the user to be validated except for allowed actions... my error.
# Jul 18th 2018, 11:20 mr.mjsm what i am facing now is that. the foreign key in the emails table is the automatic increment field in companies. so there is going to be some difficulties ;(
# Jul 18th 2018, 11:18 neon1024 You could also throw in a custom validation rule into the CompaniesTable to ensure that the `email` property is set in the request data
# Jul 18th 2018, 11:18 mr.mjsm guys I have a table "emails" that depends on table "companies". now I want to change the controller for "companies" so that I can force at least one entry in "emails" for "a company"
# Jul 18th 2018, 11:18 neon1024 If you bake the Table class, you’ll get that all done for you
# Jul 18th 2018, 11:17 neon1024 @mr.mjsm Of course it is. Just setup an association in the Table class. Then build the entity with the association. Then ensure there is a Rule in your Table class to ensure the data integrity.
# Jul 18th 2018, 11:17 okelet :hugging_face:
# Jul 18th 2018, 11:17 madbbb great rule)))
# Jul 18th 2018, 11:16 slackebot !ruleone
# Jul 18th 2018, 11:16 slackebot Command sent from Slack by neon1024:
# Jul 18th 2018, 11:15 mr.mjsm is it doable?
# Jul 18th 2018, 11:15 mr.mjsm guys I have a table "b" that depends on table "a". now I want to change the controller for "a" so that I can force at least one entry in "b" for "a"
# Jul 18th 2018, 11:14 neon1024 @okelet It’s either array or null, as shown in the book and the source code
# Jul 18th 2018, 10:56 snake-venom ?
# Jul 18th 2018, 10:56 snake-venom for each domain i need to create separate " location " in nginx config
# Jul 18th 2018, 10:55 chris-andre @snake, you'll probably point to the public folder for each app. /plugins/app1/webroot, /plugins/app2/webroot. (https://gist.github.com/chris-andre/c447c3508d02d1e1dfdb5c5616b22f46)
# Jul 18th 2018, 10:55 snake-venom you send me this
# Jul 18th 2018, 10:55 chris-andre hi
# Jul 18th 2018, 09:58 okelet Hi, when the user session has expired, the isAuthroized method is called? With a null user? Should I check if user is null or does isAuthorized method always receive a non-null user?
# Jul 18th 2018, 09:56 saeideng abstract is good
# Jul 18th 2018, 09:55 josbeir i needed it as abstract as possible (no direct ties with the ORM) so i could freely use different persistence implementations
# Jul 18th 2018, 09:54 josbeir tnx, i'm planning on writing some suplemental plugins for it
# Jul 18th 2018, 09:53 saeideng looks it is great :$ ( I just read docs )
# Jul 18th 2018, 09:49 josbeir 7.1 even...