Closed (duplicate)
Project:
Classified Ads
Version:
6.x-2.0-alpha6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2010 at 23:21 UTC
Updated:
25 Jul 2011 at 10:32 UTC
Only track is appearing.
Id the user goes on http://example.com/user/his_uid/ed-classified then Access Denied appear.
Comments
Comment #1
jmary commentedof course, I have tried to give admin classifieds ads and edit own classified ads to the user. But it doesn't help.
Finally in the file ed_classified.module, at line 320, the access argument is to have the user have access to user profiles.
This is not logical : A user should have access to the list of his classifieds post as soon as he is allowed to post some.
So to change the line 320 into :
'access arguments' => array('create classified ads'),solved it.
Comment #2
jmary commentedComment #3
cousin_itt commentedThis is a nice work around but it doesn't cover all bases.
If you have 'access user profiles' permission but don't have 'create classified ads' then you won' be able to see the lists of other people's ads.
I think the following gives you what you want and is closer to the original intent.
Use this definition for the menu item (in my dev code it's about line 485):
Then create the ed_classified_access_classified_by_user to handle permissions checking:
Comment #4
fgmI do not think this needs any code change: all it takes to fix the problem - if this is actually a problem - is to give users needing access to the Ads list (their own or someone else's) the "access user profiles" permission. The only change will be for the case of users allowed to create ads but not see other users' profiles.
Discussion is already under way with more details at #547214: Disable "My Classified Ads list" menu tab when users who can't create ads view own profile, so closing as duplicate.