Make WordPress Core

Opened 10 years ago

Closed 12 months ago

#39170 closed task (blessed) (fixed)

Remove connection between network email and super admin account

Reported by: flixos90 Owned by: johnjamesjacoby
Priority: normal Milestone: 6.9
Component: Networks and Sites Version: 3.0
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses: multisite

Description

While looking at #34293, I came across the restriction that a user's super admin capabilities cannot be revoked when that user has the same email address that is currently specified as network (admin) email address.
I just chat about this with @johnbillion and he agreed that the connection between the network email and a super admin doesn't really make sense, especially since one can easily work around it by temporarily changing the network email address before revoking super admin caps on the user. He also pointed to #14051 where the change was made, however even on that ticket there are concerns about inconsistency expressed.

I think this restriction should be removed so that any super admin can have their capabilities revoked regardless of email address. This would also clarify the meaning of the network email address (which we would then change to display as something like "Network Email" or "Network Notification Email").

Any information on the history why that change was made in the first place would be welcome, because on the ticket itself the comments seem to agree on what I'm describing here, although in the end the changeset still introduces the restriction without any documented context.

Attachments (2)

39170.diff​ (2.9 KB ) - added by flixos90 10 years ago.
39170.2.diff​ (3.0 KB ) - added by johnjamesjacoby 15 months ago.
Refreshed for 6.9.0

Download all attachments as: .zip

Change History (11)

@flixos90
10 years ago

#1 @flixos90
10 years ago

  • Keywords has-patch has-unit-tests added; needs-patch removed

39170.diff​ gets rid of the restriction. In relation to that a manage_network_options cap check has been removed since having this capability should no longer be relevant as the network email is no longer connected to super admins. The patch also adds a unit test to ensure that super admin privileges of a user with the network email address can be properly revoked.

#2 @Mista-Flo
10 years ago

I also came across this strange behavior, so I agree with that patch :)

#3 @desrosj
8 years ago

  • Milestone Awaiting Review → Future Release

This ticket was mentioned in ​Slack in #core-multisite by realloc. ​View the logs.


16 months ago

This ticket was mentioned in ​Slack in #core-multisite by realloc. ​View the logs.


16 months ago

This ticket was mentioned in ​PR #8912 on ​WordPress/wordpress-develop by ​@ideag.


16 months ago
#6

@johnjamesjacoby
15 months ago

Refreshed for 6.9.0

#7 @johnjamesjacoby
15 months ago

  • Keywords 2nd-opinion removed
  • Milestone Future Release → 6.9
  • Owner set to johnjamesjacoby
  • Status new → assigned
  • Type defect (bug) → task (blessed)
  • Version → 3.0

#8 @johnjamesjacoby
15 months ago

cc @spacedmonkey for review

#9 @johnjamesjacoby
12 months ago

  • Resolution → fixed
  • Status assigned → closed

In 60977:

Networks and Sites: remove email address check when attempting to demote a Super Admin.

This change ensures that a capable Super Admin is allowed to manage global Users as intended, and removes an invisible & undocumented restriction (that was easily bypassed anyways).

It also adds 1 multisite unit test to confirm the intended behavior

Props flixos90, johnjamesjacoby, Mista-Flo.

Fixes #39170.

Note: See TracTickets for help on using tickets.