I'm finding that when the permission view userpoints is enabled, when a user with that role visits another user's profile, besides seeing that user's points, they also see and "View" link - which leads to a 404 page.

I'm not certain of the intended behavior. Either the "View" link shouldn't be rendering for users with the view userpoints or these users should be able to access the other user's points summary. I'm betting the "View" link isn't supposed to be rendering.

Comments

berdir’s picture

Version: 6.x-1.1 » 7.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new3.31 KB

Confirmed, we also saw this when porting the module to D7.

The patch is against D7, I will create a backport once it has been commited to D7.

BenK’s picture

Status: Needs review » Reviewed & tested by the community

I've tested the patch and confirmed that the "View" link is now gone... Everything worked great (once I cleared my cache). So this looks ready to be committed!

--Ben

berdir’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new4.84 KB

Commited to D7.

Ok, attaching a possible patch for D6, might not be perfect yet.

This actually contains a full backport of the userpoints_access_my_points() functions, which simplifies the access check and doesn't check if the user already has points.

This also has a simple definition for myuserpoints, which redirects to myuserpoints/%user_uid_optional so that existing links still work. We might want to add that to D7 as well.

BenK’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev
Dret’s picture

I have a problem with the same functions in 6.x-1.1 Version:

(originally I thought was related to Contributed Module and I posted here: http://drupal.org/node/911048, sorry!)

At this moment when Admin (uid 1) try to use "Views" in a profile page of another user (uid 4) a 403 is returned.

The same 403 appear if a user (uid = 4) try to see "My Point" page or "Views" page in own profile page though having permission "view own userpoints".

Thanks Bye!

berdir’s picture

Issue tags: +userpoints backport

Tagging to make it easier to find patches like this one.

marcushenningsen’s picture

Status: Needs review » Reviewed & tested by the community

It seems to have been corrected in the dev-version.

berdir’s picture

Issue tags: -userpoints backport

#3: d6_clean_up_my_access_checks.patch queued for re-testing.

berdir’s picture

#3: d6_clean_up_my_access_checks.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work
Issue tags: +userpoints backport

The last submitted patch, d6_clean_up_my_access_checks.patch, failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new4.68 KB

New patch to fix the conflict with another patch that was commited.

berdir’s picture

Status: Needs review » Fixed

Commited.

MasterChief’s picture

Priority: Normal » Major
Status: Fixed » Needs work

This patch breaks the page my points, here the error message :

Missing argument 1 for userpoints_list_my_userpoints() in ..../userpoints.module on line 1663

berdir’s picture

Try rebuilding the menu.

MasterChief’s picture

Status: Needs work » Needs review
StatusFileSize
new496 bytes

Hi berdir!

Flush all caches has for result to just make the error goes away but the page is still broken.

Here a first patch which fix just the title problem.

berdir’s picture

Status: Needs review » Needs work

Oh, I see, $uid also needs to be replaced with $points_user->uid.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new2.74 KB

Here is a patch, can you please test?

Really messed up this one, sorry about that :)

MasterChief’s picture

I tested the patch and it works well now !

PS :

Did you the last patch in the issue for float support ?

berdir’s picture

Status: Needs review » Fixed

Ok, commited.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

quotesbro’s picture

Component: Code: userpoints_basic » Code: userpoints
Priority: Major » Normal
Status: Closed (fixed) » Needs review
StatusFileSize
new887 bytes

#15 and #17 patches result in hiding user's points on the user profile page from other users having permission 'view userpoints'.
Here is a tiny patch against 6.x-1.x-dev to fix it

quotesbro’s picture

StatusFileSize
new882 bytes

a little improvement

manuel.adan’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)

Closing this as outdated, 6.x version is no longer maintained.