Tested on Drupal 7.16 and 7.17 , both test applications with only the listed Modules active (other than the core ones)
Removing permission for the -Authenticated User- to edit his own -Profile2 page profile- cause him to lose his ability to access his -Profile2 page Main profile-.
Permission removed in
Home » Administration » People
Profile2 module >> Main profile: Edit own profile
Main profile is the default profile created by the module -Profile2 pages- itself, but the bug is present in other custom made profiles pages too.
The -Authenticated user- still have permission to see his own profile in
Home » Administration » People
Profile2 module >> Main profile: View own profile
This only happen when the chkbox in
Home » Administration » Structure » Profile types
>>Provide a separate page for editing profiles. is checked , ergo when the display of the -Profile2 pages Main profile- does NOT appen in the user core profile page
Giving the -Authenticated user- permission to Edit his own profile make the -Profile2 pages Main profile- visible and editable again.
When permisison to edit hiw own profile is removed to -Authenticated user-, the -Authenticated user- lose both access to his own profile and the menu link in the Header created by default from the module.
granting to the -Authenticated user- permission to see user profiles in
Home » Administration » People
User>>View user profiles , doesn't improve the situation.
Entity Api version: 7.x-1.0-rc3
Default Drupal theme.
Database: Mysql 5.5.27-28.1-log
PHP 5.3.18
Web server: Apache/2.4.3 (Unix) mod_fcgid/2.3.7
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | view_permission-1836322-10854574.patch | 647 bytes | edvanleeuwen |
Comments
Comment #1
gvnl commentedI have the same. I noticed though, that the profiles are actually visible to the user if the url to the profile page is entered manually. It just disappears from the menu. Thus, the issue is not about granting access, but about populating the menu.
Comment #2
gvnl commentedThis is a refinement of my previous comment. This is my take on the problem, but please forgive me for not being completely knowledgeable on Drupal's internal architecture. I think the problem works this way:
This is where my Drupal knowledge ends, sorry... Hope this helps others diagnose the problem, though.
Comment #3
menelaoEE commentedI had to change approaches since of timing issues, however in the hope to learn something new i re-enabled the previous settings to test what you said.
In my test, with the proper permission granted, even while manually passing the ID of the user in the page Url i continue to receive an ACCESS DENIED error.
It's worth noting tho that i spent only a limited amount of time testing this and that i may be making some other kind of mistake,
still thank you for taking time in replaying to my message.
Comment #4
spessex commentedI'm having the same issue. If I remove the permission to edit the users profile the link disappears from the menu and I cannot access his profile page to even view it by using the URL? I'm using 7.13
Comment #5
spessex commentedHi
Did you ever get around this problem ads I'm pretty desperate to find a fix for this?
Comment #6
Exploratus commentedSame. If I disable edit on its own page, I cannot view a profile. Man, this is one buggy module From sitemap and panels support, to a very unintuitive interaction, I am a bit underwhelmed by this module.
Comment #7
jay-dee-ess commentedAny update to this issue? I'm importing user info from LDAP into a role with a Profile2 managed profile page. I only want them to see the info and not be given the option to edit.
Comment #8
edvanleeuwenI think I have a solution, see patch attached. Please test.
Comment #9
edvanleeuwenComment #11
edvanleeuwenI am not sure why the patch fails, but what I have done is to remove a test of userView which always failed in the function profile2_user_view:
Original
Changed:
This does not seem to have negative effects to the permissions, as far as I have tested.
Comment #12
rickj commentedThis appears to be a duplicate of Issue #1954290, fixed in 7.x-1.4.