Hi, I am working with the user relationships module to create a mentor / mentee with approvals relationship where the potential mentee requests the mentor to be their mentor and the mentor is able to approve or deny the request. I realized the mentor was then unable to remove the relationship due to a change made in https://www.drupal.org/node/1245796

Hi, I create a one-way relationship name "Fan". So users can be fan of others users. The one-way work great, user are able to be fan and remove relationship, but user are able to remove there fan.

Exemple,
User A is Fan of User B
User B is able to remove the One-way relationship of User A to Them.

Is it normal ? This should not be possible, Or it should be possible to deny from the settings in admin interface when configuring the relationship type with something like, "Deny the non-owner of relationship to delete relationship".

Is it possible to do it ?!?

Thanks in advance.

I on the other hand need to allow the requestee user remove this relationship for this specific relationship type. My thought was to take the requires approval setting as the indicator to allow this removal.

Changes:

-      if (is_object($relationship_type) && $relationship_type->is_oneway && $relationship_type->requester_id != $user->uid) {
+      if (is_object($relationship_type) && $relationship_type->is_oneway && $relationship_type->requester_id != $user->uid && !$relationship_type->requires_approval) {
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kerby70’s picture

kerby70’s picture

kerby70’s picture

Sorry for the repost of the file. I was trying to get the proper number on the patch file to match the comment.

Status: Needs review » Needs work