Problem/Motivation

It isn't possible for an admin to disconnect users from UI.

Steps to reproduce

Visit user/[uid]/connected-accounts (note uid must be not current user id), try to disconnect, you receive the "You cannot connect another user's account." error.

Proposed resolution

Add a check if current operation is effectively "connected" before checking conditions that apply only to this action.

Remaining tasks

None

User interface changes

None

API changes

None

Data model changes

None

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

maurizio.ganovelli created an issue. See original summary.

maurizio.ganovelli’s picture

Added action name check.

maurizio.ganovelli’s picture

Rerolled against latest 2.x-dev branch.

pcate’s picture

Status: Needs review » Reviewed & tested by the community

Ran into this same issue. Patch applied cleanly and fixed issue. Patch works with both 2.x and 3.x.

kyber’s picture

Ran into same issue. The 2.x patch does not apply cleanly, but did fix 3.x when adapted.

kyber’s picture

Version: 2.x-dev » 3.0.0-alpha2

Oh, and I do hope the fact this bug was filed against 2.x is not resulting in it getting ignored, it spans versions.
Maybe a new one should be filed for 3.x, but I bumped the version up at least, since it seems I was allowed to do that, and I'm not sure if dupe bugs are appropriate.

maurizio.ganovelli’s picture

I confirm that patch works, and can be applied, also for 3.x branch.

hmdnawaz made their first commit to this issue’s fork.

pfrilling made their first commit to this issue’s fork.

pfrilling’s picture

Status: Reviewed & tested by the community » Needs review

I rebased the branch and updated the merge request to include functional tests. Marking this as needs review for someone to confirm my updates.

r.aubin’s picture

Status: Needs review » Reviewed & tested by the community

Looks good @pfrilling

pfrilling’s picture

Status: Reviewed & tested by the community » Fixed

Thanks all! This has been merged to 3.x.

pfrilling’s picture

Attributing credit. Thanks again!

Status: Fixed » Closed (fixed)

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