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

Clarify m.room.redaction, remove duplicate entry #2814

Merged
merged 4 commits into from Oct 16, 2020

Conversation

aaronraimist
Copy link
Contributor

Fixes #2171
Fixes #2172

As far as I can tell server admins cannot redact events in rooms where they don't have the proper power level so I have removed mention of that.

I have also removed

There is also a concept of a moderator hiding a message event, which can be undone, but cannot be applied to state events.

which doesn't seem to be a thing that exists.

Signed-off-by: Aaron Raimist <aaron@raim.ist>
Signed-off-by: Aaron Raimist <aaron@raim.ist>
@turt2live
Copy link
Member

As far as I can tell server admins cannot redact events in rooms where they don't have the proper power level so I have removed mention of that.

This is because the implementation is limited and not the spec. The authorization rules permit it happening in both v1 and v3 (where the redaction algorithms are defined).

@turt2live
Copy link
Member

"Users can redact their own events" is also misleading, as it can be prevented through power levels.

…that description

Signed-off-by: Aaron Raimist <aaron@raim.ist>
@aaronraimist
Copy link
Contributor Author

Okay I think I have fixed that.

Is it a Synapse bug that if you set the power level for m.room.redaction to 0 that you still can't redact other user's messages as a PL 0?

@turt2live
Copy link
Member

that's not a bug - you still need the redacts power level to redact other people's messages (over the client-server API).

@turt2live turt2live self-requested a review October 13, 2020 03:41
@aaronraimist
Copy link
Contributor Author

Oh I see. That's not confusing at all... I see how it provides flexibility on how you want the room to work but the difference between

"content": {
  "events": {
    "m.room.redaction": 0
  }
}

and

"content": {
  "redacts": 0
}

does not seem to be described anywhere unless I'm missing something.

@turt2live
Copy link
Member

it's badly described, but it is described.

redacts controls whether or not you're able to redact other people's messages. Separately, but related, m.room.redaction under events determines whether or not you're able to send redaction events. An admin could block self-redaction by listing m.room.redaction events at a higher power level, and could confuse everyone by setting redacts at a low level but having m.room.redaction at a high level (you shouldn't do this). Moderators would require the permission to send m.room.redaction events (default events_default, default zero) and redacts.

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.

only one comment left - thanks :D This is looking really great.

Comment on lines 39 to 41
Any user with a power level greater than or equal to the ``redact`` power level
of the room may redact events there. Additionally, server administrators may
redact messages sent by their server.
Copy link
Member

Choose a reason for hiding this comment

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

this still needs to keep the parts about users being able to self-redact. Would also be good to give context to "there" as the reader has likely forgotten by the time they read this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But I thought users may or may not be able to self-redact you mentioned a few days ago.

and yeah I can reword that. "may redact events there" is from the original sentence that's in the spec right now.

Copy link
Member

Choose a reason for hiding this comment

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

A user's ability to be able to self-redact is controlled solely by the events object, not redacts.

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 for working through this :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

spec implies that ordinary users cannot redact events m.room.redaction appears in the C-S spec twice
2 participants