Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

[FIXED] ACL Problem (permits component-user) 12 Oct 2012 12:50 #4433

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
Hello, I noticed a problem on the permissions of the component on users. I would that a user when registered, it can create, edit, and delete items created by him. So I set in the options only to the group "registered": "core.create", "core.edit.own", "core.delete.own." In the display buttons appear in the right way. However, when the user tries to edit or delete the article posted by him, that they are not allowed. Reading the various topics I've read that I had to make my own component with version 2.0 beta and doing so would solve the problem. This did not happen, in fact the user does not see any button, not even that of creation.
Everything is done correctly before reinstalling the component I reset the permissions and reloaded them once I reset. Has anyone had the same problem?

sorry for the English :)

Please Log in or Create an account to join the conversation.

Last edit: by smarano.

Re: [FIXED] ACL Problem (permits component-user) 16 Oct 2012 14:00 #4562

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
I solved it by myself, need to replace this line

$isAuthor = (isset($item->author) && ($item->created_by == JFactory::getUser()->get('id')));

with this line

$isAuthor = (isset($item->created_by ) && ($item->created_by == JFactory::getUser()->get('id')));

in the following files:

admin/models/*.php
site/models/*.php


Probably before the author field was called "author" and now is called "created_by" and they forgot to change the name of the variable in these files.
The following user(s) said Thank You: JoomGuy

Please Log in or Create an account to join the conversation.

Last edit: by smarano.

Re: [FIXED] ACL Problem (permits component-user) 16 Oct 2012 14:15 #4563

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
Well found @smarano!

smarano wrote: Probably before the author field was called "author" and now is called "created_by" and they forgot to change the name of the variable in these files.

K+1 for that solution as I'm sure that some other users have experienced this and looking at your code, it seems entirely logical that this is the case! That said, I haven't experienced it or tested this kind of behaviour myself as I've not yet got to the stage in my current component where I need to.

Thnks,

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!

Please Log in or Create an account to join the conversation.

Re: [FIXED] ACL Problem (permits component-user) 16 Oct 2012 14:43 #4565

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Yes, I found also.

I was looking in V2.0.
This problem is only in 1.5
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

Re: [FIXED] ACL Problem (permits component-user) 16 Oct 2012 15:19 #4575

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.

I made an exemption, I fixed in 1.5 because it was easy to do it.
Coding is now a piece of cake
The following user(s) said Thank You: JoomGuy, smarano

Please Log in or Create an account to join the conversation.

Re: [FIXED] ACL Problem (permits component-user) 16 Oct 2012 19:31 #4595

  • smarano
  • smarano's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 33
  • Thank you received: 1
thanks :)

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.072 seconds
  Love COOKING with COOK It has all the ingredients for a delicious Joomla component!
audibleid (Forum)

Get Started