Make WordPress Core

Opened 19 years ago

Closed 19 years ago

Last modified 6 months ago

#2024 closed defect (bug) (fixed)

Administrator role accidently assigned under certain conditions

Reported by: davidhouse's profile davidhouse Owned by:
Milestone: Priority: normal
Severity: trivial Version: 2.0
Component: Administration Keywords: bg|has-patch roles users has-patch has-unit-tests
Focuses: Cc:

Description

When writing the Role Manager plugin, the role of random users was sometimes set to Administrator after removing certain caps. This patch fixes some lazy coding (it was part of a patch I submitted a few weeks ago, when I didn't totally understand the caps API) and thus the bug.

Trivial severity as i don't think it can happen without the plugin, but it's low hanging fruit :)

Attachments (1)

2024.diff (551 bytes) - added by davidhouse 19 years ago.

Download all attachments as: .zip

Change History (14)

@davidhouse
19 years ago

#1 @ryan
19 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3266]) Role fixup from David House. fixes #2024

@jorbin commented on PR #6317:


12 months ago
#3

Initial testing is showing that fonts are correctly uploading to wp-content/uploads/fonts using both google fonts and manually uploading.

@johnbillion commented on PR #6317:


12 months ago
#4

Can we get some tests added to confirm the expected path on Multisite sub-sites? It seems the expected path is wp-content/uploads/sites/<id>}/fonts.

@jonsurrell commented on PR #6433:


10 months ago
#7

This proof of concept is superseded by https://github.com/WordPress/wordpress-develop/pull/6682.

This ticket was mentioned in PR #7204 on WordPress/wordpress-develop by @zieladam.


7 months ago
#8

I'm adding my new w.org display name to the .mailmap file. See more context in this @dmsnell's post introducing the .mailmap file: https://make.wordpress.org/core/2024/08/14/control-your-contributions-with-mailmap/

@dmsnell commented on PR #7204:


7 months ago
#9

@adamziel sadly this doesn't recurse on the remapped email, so the first record rewrites the name and email address for the GUID-like email, but the second line is necessary to rename the commits already associated with zieladam@git.wordpress.org.

I'd push but I can't update your trunk

  • .mailmap

    commit bfd799787f7a8f088e9db2e551a0051950b09beb
    Author: Dennis Snell <dennis.snell@automattic.com>
    Date:   Fri Aug 16 04:50:28 2024 -0700
    
        Also rename commits with the git.wordpress.org email.
    
    diff --git a/.mailmap b/.mailmap
    index ba7908a694..809c7037d9 100644
    a b Aaron D. Campbell <aaroncampbell@git.wordpress.org> <aaroncampbell@602fd350-edb4 
    1010Aaron Jorbin <jorbin@git.wordpress.org> <jorbin@602fd350-edb4-49c9-b593-d223f7449a82>
    1111Adam Silverstein <adamsilverstein@git.wordpress.org> <adamsilverstein@602fd350-edb4-49c9-b593-d223f7449a82>
    1212Adam Zieliński <zieladam@git.wordpress.org> <zieladam@602fd350-edb4-49c9-b593-d223f7449a82>
     13Adam Zieliński <zieladam@git.wordpress.org>
    1314Alex King <alexkingorg@git.wordpress.org> <alexkingorg@602fd350-edb4-49c9-b593-d223f7449a82>
    1415Alex Shiels <tellyworth@git.wordpress.org> <tellyworth@602fd350-edb4-49c9-b593-d223f7449a82>
    1516André <oandregal@git.wordpress.org>

@dmsnell commented on PR #7204:


7 months ago
#10

@adamziel I've merged this in [58941]
https://github.com/wordpress/wordpress-develop/commit/f4761a3f8c5aa6920d4407e3af271ef70db5f305

You now appear as you in the history.

     8  Daniel Bachhuber <danielbachhuber@git.wordpress.org>
     8  Konstantin Kovshenin <kovshenin@git.wordpress.org>
     7  Adam Zieliński <zieladam@git.wordpress.org>
     7  Michael Adams <mdawaffe@git.wordpress.org>
     6  Andrew Duthie <aduth@git.wordpress.org>

but since this PR is built from your own trunk you'll probably need to git reset --hard upstream/trunk otherwise it'll be a merge conflict when you pull in updates.

@zieladam commented on PR #7204:


7 months ago
#11

Thank you so much @dmsnell!

This ticket was mentioned in PR #7460 on WordPress/wordpress-develop by @darerodz.


6 months ago
#12

This PR adds a PHP function named wp_interactivity_get_element, analogous to the getElement() function exposed in the @wordpress/interactivity JavaScript module (see docs).

The function is intended to be used in derived state props inside wp_interactivity_state, same as wp_interactivity_get_context.

For now, the returned value is an array that contains only the attributes property, which lists the originally defined attributes present in the element. That means attributes added or modified by directive processing don't appear.

Trac ticket:

Note: See TracTickets for help on using tickets.