Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fallback value for missing invite power level #8335

Merged
merged 1 commit into from Apr 15, 2022
Merged

Fix fallback value for missing invite power level #8335

merged 1 commit into from Apr 15, 2022

Conversation

jplatte
Copy link
Contributor

@jplatte jplatte commented Apr 15, 2022

The spec was recently amended to document that invites actually fall back to a default of 0, rather than 50 (since this is what Synapse was doing all along): matrix-org/matrix-spec#1021


Notes: Fix a bug where the required power level for inviting somebody would be shown as 'Moderator' when in fact every regular user with power level >= 0 could send an invite.

Signed-off-by: Jonas Platte jplatte+git@posteo.de


This PR currently has no changelog labels, so will not be included in changelogs.

Add one of: T-Deprecation, T-Enhancement, T-Defect, T-Task to indicate what type of change this is plus X-Breaking-Change if it's a breaking change.

Preview: https://pr8335--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.

@jplatte jplatte requested a review from a team as a code owner April 15, 2022 13:27
@jplatte
Copy link
Contributor Author

jplatte commented Apr 15, 2022

This was basically just me noticing #8297 and "amending" it. A different code location may also need to be changed to render the power levels correctly in the room setting.

@codecov
Copy link

codecov bot commented Apr 15, 2022

Codecov Report

Merging #8335 (08845c8) into develop (77b0add) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##           develop    #8335   +/-   ##
========================================
  Coverage    30.01%   30.01%           
========================================
  Files          879      879           
  Lines        50089    50089           
  Branches     12746    12746           
========================================
  Hits         15036    15036           
  Misses       35053    35053           
Impacted Files Coverage Δ
src/components/views/right_panel/UserInfo.tsx 29.38% <0.00%> (ø)
.../views/settings/tabs/room/RolesRoomSettingsTab.tsx 0.68% <ø> (ø)

Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@robintown robintown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also needs to be changed in RolesRoomSettingsTab

The spec was recently amended to document that invites actually fall
back to a default of 0, rather than 50 (since this is what Synapse was
doing all along): matrix-org/matrix-spec#1021
@turt2live
Copy link
Member

the tests are definitively unhappy as well, despite trying to re-run them.

(please also don't force push after review is given - it makes re-review take longer)

@t3chguy
Copy link
Member

t3chguy commented Apr 15, 2022

still defaults to 50 (where I copied it from)

Good spot @robintown

@t3chguy
Copy link
Member

t3chguy commented Apr 15, 2022

The spec document still says 50 which doesn't help

image

@jplatte
Copy link
Contributor Author

jplatte commented Apr 15, 2022

Yeah, I don't think there's a mechanism for amending existing spec releases, so the online spec will only be updated with the next release. If there's something simple I can do about the tests (I had a look before, didn't see how the failures could be related) let me know, otherwise it would be nice if sbd. else could take this over.

@turt2live
Copy link
Member

looks like tests were an outdated branch of sorts

Copy link
Member

@robintown robintown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now 👍

@robintown robintown merged commit 1afecc4 into matrix-org:develop Apr 15, 2022
Johennes pushed a commit to Johennes/matrix-react-sdk that referenced this pull request Apr 19, 2022
The spec was recently amended to document that invites actually fall
back to a default of 0, rather than 50 (since this is what Synapse was
doing all along): matrix-org/matrix-spec#1021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants