# |
Jul 3rd 2019, 05:56 |
drailanjohn.gss |
hello guys, how can I measure the speed of a query in cake php ? |
# |
Jul 3rd 2019, 05:44 |
xuanvu442 |
Hello guys, I’ve a small question, please help me. Can I see the log request from the user? something like this |
# |
Jul 3rd 2019, 00:24 |
waspinator |
for example with the current authorized user `$this->Identity->get('id')` |
# |
Jul 3rd 2019, 00:23 |
waspinator |
is there a way to set the id crud view action if its not provided? https://crud.readthedocs.io/en/latest/actions/view.html |
# |
Jul 2nd 2019, 22:12 |
joey.mukherjee |
I don't have a method for profile in my UsersController. If I add one, it doesn't get called. However, I have `<?php echo $this->User->link ("My Profile", ['plugin' => 'CakeDC/Users', 'controller' => 'Users', 'action' => 'profile'], ['class' => 'dropdown-item']); ?>` as my link. If I change plugin to false, I get CakeDC/Users.ProfileController not found. Am I not extending correctly? |
# |
Jul 2nd 2019, 22:01 |
ricksaccous |
extend the controller... then expose the variables you want in your extended controller |
# |
Jul 2nd 2019, 21:58 |
slackebot |
wrong... |
# |
Jul 2nd 2019, 21:58 |
joey.mukherjee |
I've got another dumb question about the CakeDC Users plugin. I know how to customize the profile page as I copy it from the Template area under CakeDC to my own. However, I want to update the information that goes in there. In other words, I want to send my own related tables to the profile page. What is the best way to do that? Right now, I am editing vendor/cakedc/users/src/Controller/Traits/ProfileTrait.php. I know that is |
# |
Jul 2nd 2019, 20:44 |
joey.mukherjee |
Thanks, that worked! I had `$this->loadHelper ('CakeDC/Users.User');` in there but I guess I need the AuthLink as well. Are there others that I should be aware of? |
# |
Jul 2nd 2019, 20:29 |
rochasmarcelo |
load it inside your AppView ```public function initialize() { $this->loadHelper('CakeDC/Users.AuthLink'); ```` |
# |
Jul 2nd 2019, 20:24 |
joey.mukherjee |
I don't have this everywhere apparently. I am getting a Missing Helper error. For me to have this in my baked views, I am adding this to the top: `use CakeDC\Users\View\Helper\AuthLinkHelper;`. but it doesn't work. What is the right namespace? |
# |
Jul 2nd 2019, 20:04 |
rochasmarcelo |
https://github.com/CakeDC/users/blob/master/src/View/Helper/AuthLinkHelper.php |
# |
Jul 2nd 2019, 20:03 |
joey.mukherjee |
Thanks @rochasmarcelo, that worked... I have never seen AuthLink. Where is that? |
# |
Jul 2nd 2019, 20:03 |
ricksaccous |
oh cool, is that a thing? interesting |
# |
Jul 2nd 2019, 20:01 |
rochasmarcelo |
like ``` $this->AuthLink->isAuthorized($url)``` |
# |
Jul 2nd 2019, 20:01 |
rochasmarcelo |
or AuthLink::isAuthorized |
# |
Jul 2nd 2019, 20:00 |
rochasmarcelo |
AuthLink::link |
# |
Jul 2nd 2019, 20:00 |
rochasmarcelo |
@joey check AuthLink |
# |
Jul 2nd 2019, 19:57 |
ricksaccous |
no, you can create your own helper though |
# |
Jul 2nd 2019, 19:56 |
joey.mukherjee |
So I need booleans for every little thing? That seems wrong to me. I think I am using the Rbac so it seems like there should be an easier way, but looking at the docs, it mentions identity traits and all that and I don't think I have any of that? |
# |
Jul 2nd 2019, 19:55 |
ricksaccous |
and pass it down to the view |
# |
Jul 2nd 2019, 19:55 |
ricksaccous |
you can set a canEdit boolean in the controller |
# |
Jul 2nd 2019, 19:54 |
ricksaccous |
it doesn't come with a helper |
# |
Jul 2nd 2019, 19:54 |
ricksaccous |
@joey.mukherjee indeed, that's a component not a helper |
# |
Jul 2nd 2019, 19:52 |
joey.mukherjee |
Hello all! I am using the CakeDC Users plugin. In my view, what is the correct/best way to show (or not) a link if the user is allowed to do what the link points to or not? I have this: `if ($this->Authorization->can ($role, 'edit'))` but it says I am missing the Authorization helper. |
# |
Jul 2nd 2019, 17:29 |
ricksaccous |
https://cakesf.slack.com/archives/C053DPNGT/p1562080052460900 |
# |
Jul 2nd 2019, 17:29 |
ricksaccous |
@olanowsubomi that was already explained to you |
# |
Jul 2nd 2019, 17:24 |
olanowsubomi |
it brought ' microsoft javasript runtime error ! |
# |
Jul 2nd 2019, 17:21 |
olanowsubomi |
i was able to open my downloaded bootstrap .css files alone. why? |
# |
Jul 2nd 2019, 17:19 |
olanowsubomi |
please, can someone not open file stored as .js on windows |
# |
Jul 2nd 2019, 17:12 |
ricksaccous |
it actually wasn't allowed via authentication and i thought it was |
# |
Jul 2nd 2019, 17:12 |
ricksaccous |
nevermind me being silly |
# |
Jul 2nd 2019, 17:06 |
ricksaccous |
they get redirected to login even if that request is authorized/allowed by authentication? |
# |
Jul 2nd 2019, 17:06 |
ricksaccous |
in chrome |
# |
Jul 2nd 2019, 17:06 |
ricksaccous |
window |
# |
Jul 2nd 2019, 17:06 |
ricksaccous |
where when opening a link in an incognito windows |
# |
Jul 2nd 2019, 17:06 |
ricksaccous |
has anyone ran into an issue |
# |
Jul 2nd 2019, 15:26 |
neon1024 |
VS Code is free and works on Windows :slightly_smiling_face: |
# |
Jul 2nd 2019, 15:07 |
ndm |
Get a proper code editor and associate the `.js` extension with it, or use the context menu to select the application in which to open the file. On Windows `.js` files are by default associated with Windows Script Host, which will try to run the script... |
# |
Jul 2nd 2019, 15:07 |
olanowsubomi |
it happens whenever i want to open the any directory on the downloaded file ie bootstrap.min.js |
# |
Jul 2nd 2019, 15:05 |
olanowsubomi |
pop up |