Fix an issue with RemoteBlog failing to parse non-standard capabilities#25474
Open
Fix an issue with RemoteBlog failing to parse non-standard capabilities#25474
Conversation
kean
commented
Apr 1, 2026
|
|
||
| /// Blog's capabilities: Indicate which actions are allowed / not allowed, for the current user. | ||
| public var capabilities: [String: Bool] | ||
| public var capabilities: [String: Any] |
Contributor
Author
There was a problem hiding this comment.
A relatively safe change because Blog.capabilties are already modeled as [AnyHashable: Any] and are fully in Swift, so no changes needed in the app.
|
Contributor
|
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 32004 | |
| Version | PR #25474 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 1b4c732 | |
| Installation URL | 21po4io68kf78 |
Contributor
|
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 32004 | |
| Version | PR #25474 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 1b4c732 | |
| Installation URL | 0jah0osornnqo |
jkmassel
requested changes
Apr 8, 2026
Contributor
jkmassel
left a comment
There was a problem hiding this comment.
The failing tests probably need some attention, apart from that (and the diff noise in the JSON fixture) I think this is good to go
| @@ -1,518 +1,519 @@ | |||
| { | |||
| "sites": [ | |||
Contributor
There was a problem hiding this comment.
Could this reformatting be removed so that it properly reflects the single-line addition?
Contributor
Author
|
I updated the existing tests. |
jkmassel
approved these changes
Apr 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Description
This is an addition to CMM-2013: Login with application passwords fails if the user has non-boolean capabilities field that implements a change similar to Automattic/wordpress-rs#1263 in
WordPressKitthat is still used by the app (more details in the linked PR). It also extends the tests with some actual assertions.Testing
I added a unit test and also mocked a capability in question in
capabilitiesJSON to make sure it gets parsed for sites that do havecapabilities(Jetpack).