The "miscellaneous" panel element "Flag friend links" does not honour the role permissions set for the associated friend flag at Site building >> Flags.
The "Add friend" appears when anonymous users visit the page, even though the Friend flag permissions at .../admin/build/flags/manage/friend have been set not to allow anonymous users to use "Add friend" (in fact the Session API module is not installed, so cannot flag anonymous users anyway).
Comments
Comment #1
rdeboerJust adding:
When the anonymous user then clicks the "Add friend" link, they're invited to enter a message to send to the person they want to be a friend with.
It is not until they press "Send" on this form that they get the message "You are not allowed to flag, or unflag, this content."
Comment #2
sirkitree commentedPlease reopen if you have some code to provide.
Comment #3
JohnnyW commentedYeah, I have this exact same issue too.
Comment #4
JohnnyW commentedOkay, quickly figured it out...
Structure > Pages > User profile template > Edit
Content > "User being viewed" flag > left click on operations flyout wheel (that little wheel on right hand side) > Add new rule
User > User being viwed
Permission > receive friend email notification
CHECK Reverse (NOT)
That should do it ;)
Comment #5
JohnnyW commentedUnfortunately, this did not fix the problem as I originally believed.
Any other suggestions?
Comment #6
JohnnyW commentedWait... yes it worked... actually...
Actually, you need to set
"Access settings on Flag Friend Links" to " Only one criterion must pass. "
Also, make sure " Reverse (NOT)" is unchecked.
Okay, that finally fixed it for me, so only logged in users can see the link.
=====
Recap:
Structure > Pages > User profile template > Edit
Content > "User being viewed" flag > left click on operations flyout wheel (that little wheel on right hand side) > Add new rule
User > User being viwed
Permission > receive friend email notification
Next, Access settings on Flag Friend Links > Only one criterion must pass.
Good luck.
Comment #7
JohnnyW commentedOMG this is driving me nutty...
Last note and this is it... hope it works for you, because it finally did for me... but then again, maybe this is some intermittent bug on my server...
I decided to uncheck the NOT
And change from User being viewed, to Logged in user....
Plus...
I decided to change to " All criteria must pass. "
I really believe this is the proper settings now.
Comment #8
JohnnyW commentedConfirmed, it finally worked with the last note added on #7.