Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] ACL Problem (permits component-user)

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

  • smarano
  • smarano's Avatar
  • Offline
  • Junior Member
  • Posts: 34
  • Thank you received: 1
  • Karma: 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 :)
Last Edit: 17 Oct 2012 13:12 by smarano.
The administrator has disabled public write access.

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

  • smarano
  • smarano's Avatar
  • Offline
  • Junior Member
  • Posts: 34
  • Thank you received: 1
  • Karma: 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.
Last Edit: 16 Oct 2012 16:17 by smarano.
The administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
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!!!
The administrator has disabled public write access.

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

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

I was looking in V2.0.
This problem is only in 1.5
Coding is now a piece of cake
The administrator has disabled public write access.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
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 administrator has disabled public write access.
The following user(s) said Thank You: JoomGuy, smarano

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

  • smarano
  • smarano's Avatar
  • Offline
  • Junior Member
  • Posts: 34
  • Thank you received: 1
  • Karma: 1
thanks :)
The administrator has disabled public write access.
Time to create page: 0.079 seconds

Get Started